logWarn static method

void logWarn(
  1. String msg, {
  2. bool? isLog,
  3. bool? execFinalFunc,
  4. String? printOnceIfContains,
  5. int debounceMs = 0,
  6. String? debounceKey,
  7. String? tag,
})

Warn - Yellow text for warning messages @parammsg: The message string to be logged @paramisLog: If set to true, logs regardless of the static enable flag @paramexecFinalFunc: If true, executes the custom final function exeFinalFunc @paramprintOnceIfContains: If provided, only prints once when message contains this keyword @paramdebounceMs: Debounce time interval in milliseconds, logs within this interval will be discarded @paramdebounceKey: Custom key for debounce identification (if not provided, uses msg|devLevel|name as fallback) @paramtag: Tag for show and filtering; displayed in log output, and when isFilterByTags is true, only logs with tags matching tags are displayed

Implementation

static void logWarn(String msg,
    {bool? isLog,
    bool? execFinalFunc,
    String? printOnceIfContains,
    int debounceMs = 0,
    String? debounceKey,
    String? tag}) {
  final String fileInfo = _getFileLocation();
  final effectiveTag = tag ?? _getTagFromStackTrace();
  DevColorizedLog.logCustom(
    msg,
    devLevel: DevLevel.warn,
    enable: Dev.enable,
    colorInt: execFinalFunc != null && execFinalFunc
        ? _exeColorMap[DevLevel.warn]!
        : _logColorMap[DevLevel.warn]!,
    isLog: isLog,
    fileInfo: fileInfo,
    level: 1000,
    name: DevLevel.warn.name, // Use enum name instead of hardcoded string
    execFinalFunc: execFinalFunc,
    printOnceIfContains: printOnceIfContains,
    debounceMs: debounceMs,
    debounceKey: debounceKey,
    tag: effectiveTag,
  );
}