Log constructor

Log({
  1. String? className,
  2. String? methodName,
  3. String? text,
  4. String? timestamp,
  5. int? timeInMillis,
  6. String? exception,
  7. LogLevel? logLevel,
  8. Enum? dataLogType,
  9. String? stacktrace,
})

Implementation

Log({
  this.className,
  this.methodName,
  this.text,
  this.timestamp,
  this.timeInMillis,
  this.exception,
  this.logLevel,
  this.dataLogType,
  this.stacktrace,
}) {
  if (dataLogType != null) {
    final dataLogType = MyLogger.config.dataLogTypeValues.first.runtimeType;
    if (this.dataLogType.runtimeType != dataLogType) {
      throw "DataLogType is not: $dataLogType";
    }
  }
}