Log constructor
A convenient logging utility built on top of LogFactory.
The Log
class provides a simplified and readable interface for
logging messages at various log levels such as info, warning, error,
debug, fatal, and trace. It is typically used throughout the JetLeaf
framework to emit consistent and structured log output.
Example:
final log = Log('MyComponent');
log.info('Application started.');
log.error('Something went wrong.', error: exception, stacktrace: stack);
log.debug('Debugging some internal state...');
The tag
passed to the constructor is used to identify the origin
of log messages, such as a class or module name.
This class is final
, so it cannot be extended.
Implementation
Log(super.tag, {super.canPublish = true});