flex_logger_sentry 1.1.0
flex_logger_sentry: ^1.1.0 copied to clipboard
Sentry integration for FlexLogger - provides error reporting and crash analytics capabilities.
1.1.0 #
onEnrichScopehook –SentryLoggerProviderandSentryObserveraccept an optionalSentryScopeEnrichercallback invoked insidewithScopefor bothcaptureExceptionandcaptureMessage. Applications can set tags, fingerprint, and contexts based on their own error types carried inFlexLog.error. Exceptions thrown by the callback are caught and logged viadebugPrint; they never prevent the capture.- Separate breadcrumb and event filters – new
breadcrumbFilter(defaultMinLevelFilter(FlexLogLevel.info)) controls which logs become breadcrumbs, independently of the event filter (defaultMinLevelFilter(FlexLogLevel.error)). Previously a strict event filter (e.g. errors-only in production) also silenced all breadcrumbs, so error events arrived without any trail of prior logs. The observer's outerfilteris now the union (CompositeLogFilter.or) of both filters. - Log context on exception events –
captureExceptionevents now includemessage,log_tag,log_level, andtimestampfrom the originatingFlexLogin theloggercontext (previously the log message only appeared as a breadcrumb). SentryObserverexposeseventFilterandbreadcrumbFiltergetters; the constructor'sfilterparameter is kept as a legacy alias foreventFilter.- Behavior change:
SentryObserver.filter(the outer gate inherited fromFlexObserver) is now aCompositeLogFilterunion instead of the filter passed to the constructor — use theeventFilter/breadcrumbFiltergetters to inspect the configured filters. - Behavior change: logs carrying an
Exception/Errorbelow the event filter level are now recorded as breadcrumbs (previously they were dropped entirely). - Breadcrumb category for custom
FlexLogsubclasses now falls back to the log's level name instead oflogger. - Updated
sentry_flutterto^9.24.0.
1.0.4 #
- Updated dependencies (
sentry_flutter: ^9.14.0,flex_logger: ^1.0.4).
1.0.3 #
- Added optional
providerIdparameter toSentryLoggerProvider.
1.0.1 #
- Breaking:
SentryObserverdefault filter changed fromMinLevelFilter(FlexLogLevel.warning)toMinLevelFilter(FlexLogLevel.error). SentryObservercallbacks (onLog,onException,onError) updated toFuture<void>; all Sentry calls are now properlyawaited.onExceptionandonErrornow use pattern matching instead of force-cast, preventing potential runtime errors ifFlexLog.errortype is unexpected.- Updated docs and examples to use
CompositeLogFilter.or([TypeFilter<A>(), TypeFilter<B>()])in place of the removedMultiTypeFilter.
1.0.0 #
- Initial release
- SentryLoggerProvider – implements
LoggerProvider; requireddsn;SentryFlutter.initininitialize(),Sentry.close()indispose(); optionalfilter(defaultMinLevelFilter(FlexLogLevel.error)), optionaloptionsConfiguration(SentryFlutterOptions) - SentryObserver – FlexObserver; default filter
MinLevelFilter(FlexLogLevel.warning)when observer is constructed directly (provider passes its own filter); all received logs added as breadcrumbs; warning/error/critical also sent as events viaSentry.captureMessage; logs withFlexLog.error(Exception/Error) sent viaSentry.captureExceptioninonException/onError - FlexLogLevelSentryExtension –
FlexLogLevel.toSentryLevel()→ SentryLevel (success→info, critical→fatal) - Breadcrumb data includes message, level, category, timestamp, logger_type, log_tag, log_level
- Event context includes log_tag, timestamp, level, logger_type, category