bloomBUILD•SHIP•BLOOM
.md
Observability

Structured Logging

Bloom includes BloomLogger with structured JSON/console formatting, contextual dictionary metadata, and custom crash sinks.

BloomLogger API

Logging API
dart
// Structured BloomLogger API
BloomLogger.debug('Fetching posts from cache...');
BloomLogger.info('User authentication succeeded', context: {'userId': '42'});
BloomLogger.warning('Offline cache TTL expiring in 60s');
BloomLogger.error(
  'Payment intent processing failed',
  error: paymentException,
  stackTrace: stack,
);

Connecting Custom Log Sinks

Attach third-party crash reporting providers in your bootstrapper:

lib/app/boot.dart
dart
// Connecting Custom Log Sinks (e.g. Sentry / Datadog)
BloomLogger.addSink((record) => {
  if (record.level >= BloomLogLevel.error) {
    Sentry.captureException(record.error, stackTrace: record.stackTrace);
  }
});