Skip to content

Commit

Permalink
Merge pull request #161 from Ppito/master
Browse files Browse the repository at this point in the history
can bring your own errorHandler class
  • Loading branch information
Frezyx authored Dec 1, 2023
2 parents e5f8720 + c09d434 commit c7cc472
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/talker/lib/src/talker.dart
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ class Talker {
/// You can set your own [LoggerFormatter] [loggerFormatter]
/// to format output of talker logs,
///
/// You can set your own [TalkerErrorHandler] [TalkerErrorHandler]
/// to handle talker logs errors,
///
/// You can add your own observer to handle errors and logs in other place
/// [TalkerObserver] [observer],
/// {@endtemplate}
Expand All @@ -33,12 +36,13 @@ class Talker {
TalkerObserver? observer,
TalkerSettings? settings,
TalkerFilter? filter,
TalkerErrorHandler? errorHandler,
}) {
_filter = filter;
this.settings = settings ?? TalkerSettings();
_logger = logger ?? TalkerLogger();
_observer = observer ?? const _DefaultTalkerObserver();
_errorHandler = TalkerErrorHandler(this.settings);
_errorHandler = errorHandler ?? TalkerErrorHandler(this.settings);
}

/// Fields can be setup in [configure()] method
Expand Down

0 comments on commit c7cc472

Please sign in to comment.