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

A file logger which utilizes "logging" package. The logger is very flexible, providing ability for the user to change the log format, log file name, and to override record handler to provide custom ha [...]

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
0
points
119
downloads

Documentation

Documentation

Publisher

unverified uploader

Weekly Downloads

A file logger which utilizes "logging" package. The logger is very flexible, providing ability for the user to change the log format, log file name, and to override record handler to provide custom handling. For example, besides writing to a file, logs can be sent to a remote server.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

intl, logging, path, synchronized

More

Packages that depend on file_logs