dynamic_logger 0.1.0 copy "dynamic_logger: ^0.1.0" to clipboard
dynamic_logger: ^0.1.0 copied to clipboard

A simple and structured logger for Dart applications.

example/dynamic_logger_example.dart

import 'package:dynamic_logger/dynamic_logger.dart';

void main() async {
  // Log a simple message
  await Future.delayed(Duration(milliseconds: 500));
  DynamicLogger.log('This is an info message');
  await Future.delayed(Duration(milliseconds: 500));
  // Log a message with a specific log level
  DynamicLogger.log('This is a warning message', level: LogLevel.WARNING);
  await Future.delayed(Duration(milliseconds: 500));
  // Log a message with a tag
  DynamicLogger.log('This is an error message',
      tag: 'MyTag', level: LogLevel.ERROR);
  await Future.delayed(Duration(milliseconds: 500));
  // Log a complex data structure like a Map
  DynamicLogger.log({'key': 'value', 'anotherKey': 'anotherValue'});
  await Future.delayed(Duration(milliseconds: 500));
  // Log a Dio RequestOptions object (example)
  // final requestOptions = RequestOptions(path: 'https://example.com');
  // print('Logging Dio RequestOptions');
  // DynamicLogger.log(requestOptions);
}
1
likes
0
points
70
downloads

Publisher

unverified uploader

Weekly Downloads

A simple and structured logger for Dart applications.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

collection, dio, logging

More

Packages that depend on dynamic_logger