MiniLoggerConfig constructor

MiniLoggerConfig({
  1. bool withPrint = true,
  2. MiniLoggerLevelEnum? minPrintLevel,
  3. bool withSQLite = false,
  4. MiniLoggerLevelEnum? minSQLiteLevel,
  5. MiniLoggerLevelEnum? minUpLevel,
  6. bool withPrintColor = false,
  7. String tag = "mini_log",
  8. UpLogEvent? upLogEvent,
})

初始化配置

Implementation

MiniLoggerConfig({
  bool withPrint = true,
  MiniLoggerLevelEnum? minPrintLevel,
  bool withSQLite = false,
  MiniLoggerLevelEnum? minSQLiteLevel,
  MiniLoggerLevelEnum? minUpLevel,
  bool withPrintColor = false,
  String tag = "mini_log",
  this.upLogEvent,
}) {
  this._withPrint = withPrint;
  this._withSQLite = ([
        TargetPlatform.android,
        TargetPlatform.iOS,
        TargetPlatform.macOS
      ].contains(defaultTargetPlatform)) &&
      withSQLite;
  this._withPrintColor =
      (defaultTargetPlatform != TargetPlatform.iOS) && withPrintColor;
  this._minPrintLevel = minPrintLevel ?? MiniLoggerLevelEnum.D;
  this._minSQLiteLevel = minSQLiteLevel ?? MiniLoggerLevelEnum.I;
  this._minUpLevel = minUpLevel ?? MiniLoggerLevelEnum.W;
  this._tag = tag;
}