Skip to content

Commit

Permalink
Fix logger after updateConfig
Browse files Browse the repository at this point in the history
Fixes #39
  • Loading branch information
ThexXTURBOXx committed Nov 18, 2024
1 parent efc9aa9 commit 4957954
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/core/catcher_2.dart
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ class Catcher2 implements ReportModeAction {
_instance = this;
_configureNavigatorKey(navigatorKey);
_setupCurrentConfig();
_setupLogger();
_configureLogger();
_setupReportModeActionInReportMode();
_setupScreenshotManager();
Expand Down Expand Up @@ -249,12 +250,14 @@ class Catcher2 implements ReportModeAction {
}
}

void _configureLogger() {
void _setupLogger() {
_logger = _currentConfig.logger ?? Catcher2Logger();
if (enableLogger) {
_logger.setup();
}
}

void _configureLogger() {
for (final handler in _currentConfig.handlers) {
handler.logger = _logger;
}
Expand Down

0 comments on commit 4957954

Please sign in to comment.