warning method

Future<void> warning(
  1. String message, [
  2. List<String> tags = const []
])
inherited

Logs a warning message with automatic tag merging.

Warning messages indicate potential issues or degraded performance that don't prevent operation but may need attention. The class's loggerTags are automatically included.

Example:

await warning('API rate limit approaching: ${requests}/${limit}');

Parameters:

  • message - The warning message to log
  • tags - Additional tags to merge with loggerTags

Best Practices:

  • Highlight performance degradation or resource constraints
  • Note when fallback mechanisms are used
  • Include relevant metrics or thresholds
  • Tag with components that might need attention

Throws:

  • LoggerException if the global logger has been disposed

Implementation

Future<void> warning(String message, [List<String> tags = const []]) async {
  await log(message, type: LogType.warning, tags: tags);
}