Closed ArchitMukherjee closed 6 months ago
Hi, this seems to be more of a code question than a library issue. In other words, please ask such questions on StackOverflow or similar in the future.
Nevertheless, I guess this approach seems to be feasible, however, I can't really recommend anything without knowing your problem/use-case.
Also, the provided code wasn't intended to be a copy-paste snippet, but more of an "only the important bits are included" snippet.
As for your error, await
can only be used in an async method, like in:
void main() async {
// ...
}
And regarding the request for an example, please only announce your support in the respective issue, by either upvoting the initial issue comment or posting a comment yourself.
I am trying to make a logger that would save the logs to a file in a specified directory. But I am unable to get the file for saving the logs. My logging.dart file is
I tried to use the following code as given in #43
but it is showing giving errors when I use the
await
keyword.What I want to do is import this file wherever required and use the logger variable to log information. Is this the right approach or should I do something else? Also please provide an example for logging out to a file as asked in #56