simple_log 1.0.7 copy "simple_log: ^1.0.7" to clipboard
simple_log: ^1.0.7 copied to clipboard

outdated

A simple way to upload logs to remote server, support all platforms, dart-native, dart-js, flutter-android, flutter-ios, flutter-web, flutter-windows, flutter-linux, flutter-mac.

example/simple_log_example.dart

import 'package:simple_log/simple_log.dart';

void main() {
  SimpleLog logger = new SimpleLog(appId: 123, appKey: 'yourAppKey1');
  SimpleLog logger2 =
      new SimpleLog(key: 'key2', appId: 456, appKey: 'yourAppKey2');

  // default key is "default"
  assert(logger == new SimpleLog(key: 'default'));

  // debug level
  logger.d("hello world");

  // info level
  logger.i("hello world");

  // warning level
  logger.w({"a": 1, "b": "c"});

  // error level log will be printed on the local terminal
  logger2.setPrintLevels([Level.Error]);

  // error level
  // this log will be printed on the local terminal
  logger2.e(logger);

  logger2.setUploadLevels(null);

  // fatal level
  // this log will be printed on the local terminal but will not be uploaded
  logger2.f(["p1", "p2"]);
}
1
likes
0
pub points
0%
popularity

Publisher

verified publisheravenge.app

A simple way to upload logs to remote server, support all platforms, dart-native, dart-js, flutter-android, flutter-ios, flutter-web, flutter-windows, flutter-linux, flutter-mac.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

http

More

Packages that depend on simple_log