logWithTime static method

void logWithTime(
  1. dynamic message, [
  2. LogLevel logLevel = LogLevel.VERBOSE
])

Implementation

static void logWithTime(dynamic message,
    [LogLevel logLevel = LogLevel.VERBOSE]) {
  if (_logLevel.index >= logLevel.index) {
    final formattedTime =
        DateFormat('yyyy-MM-ddTHH:mm:ss').format(DateTime.now());
    if (message is Object) {
      print('$formattedTime: $message');
    } else {
      print('$formattedTime: $message');
    }
  }
}