Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can bring your own errorHandler class #161

Merged
merged 1 commit into from
Dec 1, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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