simc / logger

Small, easy to use and extensible logger which prints beautiful logs.
https://pub.dev/packages/logger
MIT License
1.07k stars 129 forks source link

feat(printer):create one line printer with stack trace #145

Open danielle-h opened 2 years ago

danielle-h commented 2 years ago

This is a printer that prints the calling function + the message, and optionally the time in one line.

This makes the logger much easier to use with VSCode. VSCode has filtering options that I wanted to use for e.g. viewing all the log outputs from my PageManager.dart class. However, if I use PrettyPrinter the stack trace is on a separate line from the message, so the filter was self defeating. Using this I could easily filter only the outputs I needed.

I hope you find this useful.