logging_manager 1.0.0
logging_manager: ^1.0.0 copied to clipboard
A starting point for Dart libraries or applications.
Logging Manager #
A manager for pub.dev:logging. Provides simple APIs to change the way logs are handled.
Features #
LoggingTreeis attached as a listener to logs sent from logger by theLoggingManager. Implementations are: PrintingColoredLogsTree, PrintingLogsTree, FormattedOutputLogsTree.LoggingManagercan be used to create a logger, listen to logs, changeLoggingTrees.
Getting started #
Start by importing this package in your project using
For Dart #
dart pub add logging_manager
For Flutter #
flutter pub add logging_manager
With Pub #
pub add logging_manager
Usage #
- Import this package in file.
import 'package:logging_manager/logging_manager.dart';
- Create a LoggingManager. Note: A LoggingTree is responsible for doing something with logs. If none provided, nothing will happen.
final logginManager = LoggingManager(
tree: PrintingColoredLogsTree(),
);
- Get
package:logging's logger from above manager.
final logger = logginManager.root;
- Use to log anything.
logger.info('Hello World');
Additional information #
For more information about using the logger, check pub.dev:logging.