LoggerOptions class
Singleton class that manages global logger configuration settings.
This class provides a centralized way to configure default settings for all Logger instances in an application. Individual Logger constructors can override these global settings as needed.
Properties
- dateTimeFormat ↔ String?
-
Custom date/time format string for timestamps
getter/setter pair
- effectiveDateTimeFormat → String
-
Gets the effective dateTimeFormat setting (default: 'HH:mm:ss')
no setter
- effectiveEnableColors → bool
-
Gets the effective enableColors setting (default: true)
no setter
- effectiveEnableLogging → bool
-
Gets the effective enableLogging setting (default: true)
no setter
- effectiveIncludeTimestamp → bool
-
Gets the effective includeTimestamp setting (default: false)
no setter
- effectiveMessageTemplate → String?
-
Gets the effective messageTemplate setting (default: null for built-in formatting)
no setter
- effectiveMinLogLevel → LogLevel
-
Gets the effective minimum log level (default: LogLevel.debug)
no setter
- effectiveShowClassName → bool
-
Gets the effective showClassName setting (disabled for future release)
no setter
- effectiveShowFunctionName → bool
-
Gets the effective showFunctionName setting (default: true)
no setter
- effectiveShowLocation → bool
-
Gets the effective showLocation setting (default: true)
no setter
- enableColors ↔ bool?
-
Global enable/disable switch for ANSI color output
getter/setter pair
- enableLogging ↔ bool?
-
Global enable/disable switch for all logging
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- includeTimestamp ↔ bool?
-
Whether to include timestamps in log messages
getter/setter pair
- messageTemplate ↔ String?
-
Custom message template for log formatting
getter/setter pair
- minLogLevel ↔ LogLevel?
-
Minimum log level to output globally
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- showClassName ↔ bool?
-
Whether to show class names in log output
getter/setter pair
- showFunctionName ↔ bool?
-
Whether to show function names in log output
getter/setter pair
- showLocation ↔ bool?
-
Whether to show file location information in log output
getter/setter pair
Methods
-
configureInstance(
{bool? enableLogging, bool? enableColors, LogLevel? minLogLevel, bool? showFunctionName, bool? showLocation, bool? includeTimestamp, String? dateTimeFormat, String? messageTemplate}) → void - Instance method for backward compatibility
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
resetInstance(
) → void - Instance method for backward compatibility
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- instance → LoggerOptions
-
Gets the singleton instance of LoggerOptions
no setter
Static Methods
-
configure(
{bool? enableLogging, bool? enableColors, LogLevel? minLogLevel, bool? showFunctionName, bool? showLocation, bool? includeTimestamp, String? dateTimeFormat, String? messageTemplate}) → void - Configure multiple options at once
-
reset(
) → void - Reset all configuration options to their default values (null)
-
setDateTimeFormat(
String format) → void - Set custom date/time format string for timestamps
-
setEnableColors(
bool enable) → void - Set the global enable/disable switch for ANSI color output
-
setEnableLogging(
bool enable) → void - Set the global enable/disable switch for all logging
-
setIncludeTimestamp(
bool include) → void - Set whether to include timestamps in log messages
-
setMessageTemplate(
String template) → void - Set custom message template for log formatting
-
setMinLogLevel(
LogLevel level) → void - Set the minimum log level to output globally
-
setShowFunctionName(
bool show) → void - Set whether to show function names in log output
-
setShowLocation(
bool show) → void - Set whether to show file location information in log output