stdlog 1.0.2 copy "stdlog: ^1.0.2" to clipboard
stdlog: ^1.0.2 copied to clipboard

A wrapper around the built-in stdio IOSinks using the KISS principle.

example/stdlog_example.dart

import 'package:stdlog/stdlog.dart' as std;

const x = 7;
const y = 12;
const result = 46;

void main() {
  std.debug.enabled = true;
  std.debug.log('Running in debug mode!');

  std.info.log('This program adds $x and $y.');
  std.warn.log('Crazy math here, be warned!');

  if ((x + y) != result) {
    // We can use functions as well.
    std.error.log(() {
      const actual = x + y;
      return '$x + $y != $result, it equals $actual; error!';
    });
  }
}
0
likes
0
pub points
0%
popularity

Publisher

verified publishertytydraco.xyz

A wrapper around the built-in stdio IOSinks using the KISS principle.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

More

Packages that depend on stdlog