trace 0.0.6-prerelease copy "trace: ^0.0.6-prerelease" to clipboard
trace: ^0.0.6-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
130
pub points
46%
popularity
screenshot

Publisher

verified publishernikosportolos.com

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
Contributing

Topics

#trace #logging #print #console #file

Documentation

Documentation
API reference

License

MIT (license)

Dependencies

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

More

Packages that depend on trace