classic_logger 1.0.0 copy "classic_logger: ^1.0.0" to clipboard
classic_logger: ^1.0.0 copied to clipboard

It is a cross-platform classic and minimalist logger written in the Dart language.

example/example.dart

// Copyright 2022 Kato Shinya. All rights reserved.
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided the conditions.

import 'package:classic_logger/classic_logger.dart';

void main() {
  // The easiest way to use default logger.
  final logger = Logger();
  logger.trace('Trace');
  logger.debug('Debug');
  logger.info('Info');
  logger.warn('Warn');
  logger.error('Error');
  logger.fatal('Fatal');
  logger.dispose();

  // The way to use custom logger.
  final customLogger = Logger.fromConfig(LogConfig(
    baseLevel: LogLevel.info,
    output: MultiOutput([
      ConsoleOutput(),
      FileOutput('log.txt'),
    ]),
  ));

  customLogger.trace('Trace');
  customLogger.debug('Debug');
  customLogger.info('Info');
  customLogger.warn('Warn');
  customLogger.error('Error');
  customLogger.fatal('Fatal');
  customLogger.dispose();
}
7
likes
110
pub points
50%
popularity

Publisher

unverified uploader

It is a cross-platform classic and minimalist logger written in the Dart language.

Repository (GitHub)
View/report issues
Contributing

Documentation

API reference

License

BSD-3-Clause (LICENSE)

Dependencies

intl

More

Packages that depend on classic_logger