debug method
Logs a debug message with automatic tag merging.
Debug messages contain detailed diagnostic information useful during
development. The class's loggerTags
are automatically included.
Example:
await debug('Cache hit for key: $cacheKey', ['cache', 'performance']);
Parameters:
message
- The debug message to logtags
- Additional tags to merge withloggerTags
Best Practices:
- Include relevant state information
- Use specific tags for easy filtering during debugging
- Avoid logging sensitive data (passwords, tokens, etc.)
- Consider the performance impact in tight loops
Throws:
LoggerException
if the global logger has been disposed
Implementation
Future<void> debug(String message, [List<String> tags = const []]) async {
await log(message, type: LogType.debug, tags: tags);
}