warning method
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 logtags
- Additional tags to merge withloggerTags
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);
}