StrategicLogger class
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
-
debug(dynamic message, {LogEvent? event, Map<String, Object>? context})
→ void
-
Adds debug level logging.
-
dispose()
→ void
-
Disposes the logger and cleans up resources
-
error(dynamic error, {StackTrace? stackTrace, LogEvent? event, Map<String, Object>? context})
→ void
-
Logs an error using the configured strategies.
-
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
-
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})
→ Future<void>
-
Configures the logger if it has not been initialized.
-
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.
-
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})
→ 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).
-
warning(dynamic message, {LogEvent? event, Map<String, Object>? context})
→ void
-
Adds warning level logging.