DartDart SDK Troubleshooting Guide

The Dart SDK uses the standard logging package. Use the following code to enable logging:

pubnub.log.level = Level.ALL
pubnub.onRecord.listen((record) {
  print('${record.level.name}: ${record.time}: ${record.message}');

Dart assigns a weight to each type of log messages. When you set the logging level with Pubnub.log.level = Level.loglevel, your application logs only messages with a weight of at least loglevel.

The threshold levels are defined in the Level class, as follows:

  • OFF weight is 2000, and turns logging off
  • SHOUT weight is 1200
  • SEVERE weight is 1000
  • WARNING weight is 900
  • INFO weight is 800
  • CONFIG weight is 700
  • FINE weight is 500
  • FINER weight is 400
  • FINEST weight is 300
  • ALL weight is 0, and turns on logging for all levels