Logger class

The main logger for SLog and its dependencies

Inheritance
Mixed-in types

Constructors

Logger({required SLogOptions options})
Creates a new instance of the base logger
Logger.init({SLogOptions options = const SLogOptions.none()})
Init the global instance of the SLog with options
factory

Properties

channels List<SLogChannel>
Get the current options that the logger is using.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
options SLogOptions
Get the current options that the logger is using.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

log(String message, {Object? data, Level level = Level.INFO, String? channel, StackTrace? trace}) → void
Log an event to the logger
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
registerChannel(String channel) → void
Register a new channel to the logger
inherited
requestLog(LogRequest request) Future<void>
Used to run the interceptors and printers
inherited
toString() String
A string representation of this object.
inherited
unregisterChannel(String channel) → void
Unregister a channel from the logger
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

I Logger
Get the global instance of the SLog
no setter
instance Logger
Get the global instance of the SLog
no setter