1

Dart natively supports a developer log function, which in Flutter automatically appends logging output to the device log.

But when I build a (server) CLI application in Dart, these logs appear to be only accessible via DevTools.

Where can I find the API to build a custom appender? (Or is there already a Pub package that can append to console and/or rotating log files?)

Timo
  • 902
  • 1
  • 10
  • 21
  • See my answer here: https://stackoverflow.com/a/69400502/85472 Basically you need to register a Logger yourself in order to get output when using the log function from the `dart:developer` package. You can also see how I do it in the [source code of the small package](https://github.com/maks/bonsai_dart/blob/main/lib/src/bonsai_base.dart#L19) I've published. – Maks Oct 01 '21 at 05:40

0 Answers0