ubuntu_logger 0.2.0 copy "ubuntu_logger: ^0.2.0" to clipboard
ubuntu_logger: ^0.2.0 copied to clipboard

A logging frontend based on Google's logging library for Dart.

Ubuntu Logger for Dart #

pub license: MPL CI codecov

A logging frontend based on Google's logging library for Dart.

Usage #

Import the library:

import 'package:ubuntu_logger/ubuntu_logger.dart';
copied to clipboard

Setup logging:

void main() {
  Logger.setup(
    path: '/path/to/file.log',
    level: LogLevel.info,
  );
}
copied to clipboard

Log messages:

final log = Logger('a_context');

log.debug('This is a debug message.');
log.info('This is an info message.');
copied to clipboard

Prints to the console:

INFO a_context: This is an info message.
copied to clipboard

Writes to the log file:

YYYY-MM-DD HH:MM:SS.zzzzzz INFO a_context: This is an info message.
copied to clipboard
6
likes
140
points
2.77k
downloads

Publisher

verified publishercanonical.com

Weekly Downloads

2024.09.11 - 2025.03.26

A logging frontend based on Google's logging library for Dart.

Homepage
Repository (GitHub)
View/report issues
Contributing

Documentation

API reference

License

MPL-2.0 (license)

Dependencies

collection, logging, logging_appenders, path

More

Packages that depend on ubuntu_logger