StrategicLogger class
- Available extensions
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- isAutoInitialized → bool
-
Indicates whether the logger was auto-initialized (without explicit
initialize()call).no setter - isInitialized → bool
-
Indicates whether the logger has been initialized.
no setter
- level → LogLevel
-
Current log level of the logger.
no setter
-
logStream
→ Stream<
LogEntry> -
Stream of log entries for real-time console updates
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
d(
dynamic msg, {Map< String, Object> ? context}) → void -
Available on StrategicLogger, provided by the StrategicLoggerShorthand extension
Shorthand for debug. Logs a debug message. -
debug(
dynamic message, {LogEvent? event, Map< String, Object> ? context}) → void - Adds debug level logging.
-
dispose(
) → void - Disposes the logger and cleans up resources
-
e(
dynamic msg, {StackTrace? stackTrace, Map< String, Object> ? context}) → void -
Available on StrategicLogger, provided by the StrategicLoggerShorthand extension
Shorthand for error. Logs an error. -
error(
dynamic error, {StackTrace? stackTrace, LogEvent? event, Map< String, Object> ? context}) → void - Logs an error using the configured strategies.
-
f(
dynamic msg, {StackTrace? stackTrace, Map< String, Object> ? context}) → void -
Available on StrategicLogger, provided by the StrategicLoggerShorthand extension
Shorthand for fatal. Logs a fatal error. -
fatal(
dynamic error, {StackTrace? stackTrace, LogEvent? event, Map< String, Object> ? context}) → void - Logs a fatal error using the configured strategies.
-
flush(
) → void - Forces flush of all queued logs
-
getPerformanceStats(
) → Map< String, dynamic> - Gets performance statistics
-
i(
dynamic msg, {Map< String, Object> ? context}) → void -
Available on StrategicLogger, provided by the StrategicLoggerShorthand extension
Shorthand for info. Logs an info message. -
info(
dynamic message, {LogEvent? event, Map< String, Object> ? context}) → void - Logs an info message or event using the configured strategies.
-
initialize(
{List< LogStrategy> ? strategies, LogLevel level = LogLevel.none, bool? useIsolates, bool enablePerformanceMonitoring = true, bool enableModernConsole = true, bool force = false, String? projectName, bool showBanner = true}) → Future<void> - Configures the logger if it has not been initialized.
-
listen(
void onData(LogEntry)) → StreamSubscription< LogEntry> - Listens to all log entries for custom processing.
-
log(
dynamic message, {LogEvent? event, Map< String, Object> ? context}) → void - Logs a message or event using the configured strategies.
-
logStructured(
LogLevel level, dynamic message, {Map< String, Object> ? data, String? tag, DateTime? timestamp}) → void - Logs a message with structured data.
-
named(
String name) → NamedLogger - Creates a named logger that automatically includes the logger name in context.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
reconfigure(
{List< LogStrategy> ? strategies, LogLevel level = LogLevel.none, bool useIsolates = true, bool enablePerformanceMonitoring = true, bool enableModernConsole = true, String? projectName, bool showBanner = true}) → Future<void> - Reconfigures the logger even if it has been previously initialized.
-
toString(
) → String -
A string representation of this object.
inherited
-
verbose(
dynamic message, {LogEvent? event, Map< String, Object> ? context}) → void - Adds verbose level logging (alias for debug).
-
w(
dynamic msg, {Map< String, Object> ? context}) → void -
Available on StrategicLogger, provided by the StrategicLoggerShorthand extension
Shorthand for warning. Logs a warning message. -
warning(
dynamic message, {LogEvent? event, Map< String, Object> ? context}) → void - Adds warning level logging.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited