Comment on page
Modifying the Logger
With regards to the printer, the
CodenicLogger
can only accept a special printer called MessageLogPrinter
which enforces a fixed structure for the printed logs./// CODE FORKED FROM https://pub.dev/packages/logger#options
final codenicLogger = CodenicLogger(
filter: null, // Use the default LogFilter (-> only log in debug mode)
output: null, // Use the default LogOutput (-> send everything to console)
printer: MessageLogPrinter(
methodCount: 2, // number of method calls to be displayed
errorMethodCount: 8, // number of method calls if stacktrace is provided
lineLength: 120, // width of the output
colors: true, // Colorful log messages
printEmojis: true, // Print an emoji for each log message
printTime: false // Should each log print contain a timestamp
stackTraceBlocklist: [ // Blocklists the stack trace lines that matches any of the regex
RegExp('package:codenic_logger/'),
RegExp('package:codenic_bloc_use_case/'),
],
),
);
Last modified 11mo ago