file_logs 1.0.6 copy "file_logs: ^1.0.6" to clipboard
file_logs: ^1.0.6 copied to clipboard

A flexible file logger based on the "logging" package, supporting file rotation, date-based log splitting, and custom handlers.

example/file_logs_example.dart

import 'package:file_logs/file_logs.dart';

Future<void> main() async {
  final logger = FileLogger(maxFileSize: 512, logPath: 'file_logs');
  await logger.clearLogs();
  logger.finest('This is a finest message');
  logger.finer('This is a finer message');
  logger.fine('This is a fine message');
  logger.info('This is an info message');
  logger.config('This is a config message');

  try {
    throw Exception('This is a test exception');
  } catch (e, stackTrace) {
    logger.warning('This is a warning message', e, stackTrace);
    logger.severe('This is a severe message', e, stackTrace);
    logger.shout('This is a shout message', e, stackTrace);
  }
}
1
likes
150
points
118
downloads

Documentation

Documentation
API reference

Publisher

unverified uploader

Weekly Downloads

A flexible file logger based on the "logging" package, supporting file rotation, date-based log splitting, and custom handlers.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

intl, logging, path, synchronized

More

Packages that depend on file_logs