dart_logging 0.11.0-beta copy "dart_logging: ^0.11.0-beta" to clipboard
dart_logging: ^0.11.0-beta copied to clipboard

A logging framework with structured logging, child loggers, and console output.

dart_logging #

Pino-style structured logging with child loggers.

Getting Started #

import 'package:dart_logging/dart_logging.dart';

void main() {
  final context = createLoggingContext(
    transports: [logTransport(logToConsole)],
  );
  final logger = createLoggerWithContext(context);

  logger.info('Hello world');
  logger.warn('Something might be wrong');
  logger.error('Something went wrong');

  // Child logger with inherited context
  final childLogger = logger.child({'requestId': 'abc-123'});
  childLogger.info('Processing request'); // requestId auto-included
}

Part of dart_node #

GitHub

0
likes
150
points
157
downloads

Publisher

verified publisherchristianfindlay.com

Weekly Downloads

A logging framework with structured logging, child loggers, and console output.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

More

Packages that depend on dart_logging