zef_log_core 0.0.2 copy "zef_log_core: ^0.0.2" to clipboard
zef_log_core: ^0.0.2 copied to clipboard

A versatile and extensible logging framework for Dart applications, providing configurable log levels, custom formatting, and adaptable output options. Designed with flexibility in mind, this package [...]

example/zef_log_core_example.dart

import 'package:zef_log_core/zef_log_core.dart';

void main() {
  // Custom logger configuration
  configureLogger();

  // Log messages at various levels
  logMessages();
}

void configureLogger() {
  // Initialize the logger with default settings
  Logger.I
      .info(message: 'Starting application with default logger configuration.');

  // Or, configure the logger with custom settings
  // LoggerBuilder()
  //     .withLogLevel(LogLevel.debug) // Set minimum log level to debug
  //     .withAdapter(ConsoleLoggerAdapter()) // Use console logger adapter
  //     .withFormatter(DefaultLogFormatter()) // Use default log formatter
  //     .build();

  Logger.I.debug(message: 'Logger configured with custom settings.');
}

void logMessages() {
  Logger.I.trace(message: 'This is a trace log - very detailed information.');
  Logger.I.debug(message: 'This is a debug log - useful for debugging.');
  Logger.I.info(message: 'This is an info log - general operational events.');
  Logger.I.warning(
      message: 'This is a warning log - something unexpected happened.');
  Logger.I.error(
      message:
          'This is an error log - an error occurred but the application can still continue.',
      error: 'SampleError');
  Logger.I.fatal(
      message:
          'This is a fatal log - a critical error occurred, the application might terminate.',
      error: 'CriticalError');
}
2
likes
150
points
194
downloads

Publisher

verified publisherzooper.dev

Weekly Downloads

A versatile and extensible logging framework for Dart applications, providing configurable log levels, custom formatting, and adaptable output options. Designed with flexibility in mind, this package allows developers to easily integrate comprehensive logging into their Dart and Flutter projects.

Homepage
Repository (GitHub)
View/report issues

Topics

#logging #abstractions

Documentation

API reference

Funding

Consider supporting this project:

buymeacoffee.com

License

MIT (license)

More

Packages that depend on zef_log_core