Skip to content

Commit dab0407

Browse files
committed
Call logCallbacks on every LogEvent, closes #24
1 parent b3e16e8 commit dab0407

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

lib/src/logger.dart

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,11 +127,13 @@ class Logger {
127127
} else if (level == Level.nothing) {
128128
throw ArgumentError('Log events cannot have Level.nothing');
129129
}
130+
130131
var logEvent = LogEvent(level, message, error, stackTrace);
132+
for (var callback in _logCallbacks) {
133+
callback(logEvent);
134+
}
135+
131136
if (_filter.shouldLog(logEvent)) {
132-
for (var callback in _logCallbacks) {
133-
callback(logEvent);
134-
}
135137
var output = _printer.log(logEvent);
136138

137139
if (output.isNotEmpty) {

0 commit comments

Comments
 (0)