init static method

void init({
  1. bool isDebug = false,
  2. String tag = _defaultTag,
  3. LogLevel level = LogLevel.verbose,
})

初始化日志工具类

Initializes the log utility with optional debug mode, tag, and log level. This method can only be called once.

Implementation

static void init({
  bool isDebug = false,
  String tag = _defaultTag,
  LogLevel level = LogLevel.verbose,
}) {
  _debuggable = isDebug;
  _currentTag = tag.isEmpty ? _defaultTag : tag;
  _logLevel = level;
}