Skip to content

Commit

Permalink
Add comment about unsafe print
Browse files Browse the repository at this point in the history
  • Loading branch information
PlugFox committed Jul 13, 2023
1 parent fe239bd commit 9426bb0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/src/log_options.dart
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@ abstract base class LogOptions {
/// If returns `null` then the message
/// will not be output by the default logger.
/// E.g. useful for JSON output, or output to a file/database/server.
///
/// **DO NOT USE `print(msg)` INSIDE THIS FUNCTION!**
/// **IT WILL CAUSE AN INFINITE LOOP!**
/// Just return a formatted string for standard output,
/// or use `stdout.write(msg)` / `stderr.write(err)`
/// or your own output logic.
OverrideLoggerOutput? get overrideOutput;

/// Default Logger options
Expand Down

0 comments on commit 9426bb0

Please sign in to comment.