log method

void log(
  1. DataRequestLabel label,
  2. String message, {
  3. int logLevel = 1,
})
inherited

Implementation

void log(DataRequestLabel label, String message, {int logLevel = 1}) {
  if (_logLevel >= logLevel) {
    final now = DateTime.now();
    final timestamp =
        '${now.second.toString().padLeft(2, '0')}:${now.millisecond.toString().padLeft(3, '0')}';
    print('$timestamp ${' ' * label.indentation * 2}[$label] $message');
  }
}