logThis static method

void logThis({
  1. String? className,
  2. String? methodName,
  3. required String text,
  4. required LogLevel type,
  5. dynamic exception,
  6. String? dataLogType,
  7. StackTrace? stacktrace,
})

logThis

Logs 'String' data along with class & function name to hourly based file with formatted timestamps.

@param className the class name @param methodName the method name @param text the text @param type the type

Implementation

static void logThis({
  String? className,
  String? methodName,
  required String text,
  required LogLevel type,
  dynamic exception,
  String? dataLogType,
  StackTrace? stacktrace,
}) async {
  // prevent to write LogLevel.ALL and LogLevel.OFF to db
  if (![LogLevel.OFF, LogLevel.ALL].contains(type)) {
    _logThis(className, methodName, text, type, exception, dataLogType,
        stacktrace);
  }
}