trace 0.0.4-prerelease copy "trace: ^0.0.4-prerelease" to clipboard
trace: ^0.0.4-prerelease copied to clipboard

Trace is a minimalistic logger for your Dart & Flutter projects, that uses AnsiX to print customizable messages in terminal and export log files.

example/main.dart

import 'package:trace/trace.dart';

void main() async {
  final ConsoleLogger logger = ConsoleLogger(
    filter: DefaultLogFilter(
      LogLevel.verbose,
      debugOnly: false,
    ),
  );

  Trace.registerLogger(logger);
  Trace.level = LogLevel.verbose;

  Trace.verbose('This is a verbose test message');
  Trace.debug('This is a debug test message');
  Trace.info('This is an info test message');
  Trace.success('This is a success test message');
  Trace.warning('This is a warning test message');
  Trace.error(
    'This is an error test message',
    Exception('Random exception'),
    StackTrace.current,
  );
  Trace.fatal(
    'This is a fatal test message',
    Exception('Critical exception'),
    StackTrace.current,
  );

  await Trace.dispose();
}
8
likes
0
points
304
downloads

Publisher

verified publishernikosportolos.com

Weekly Downloads

Trace is a minimalistic logger for your Dart & Flutter projects, that uses AnsiX to print customizable messages in terminal and export log files.

Repository (GitHub)
View/report issues

Topics

#trace #logging #print #console #file

Documentation

Documentation

License

unknown (license)

Dependencies

ansix, collection, data_class_plugin, date_time_format, meta, path, rxdart, stack_trace

More

Packages that depend on trace