LogProperties class final
A small, thread-safe global registry for logging configuration and diagnostic properties within Jetleaf.
This singleton provides a shared key–value map that holds global
logging flags, level definitions, and environment metadata.
Instances of _LogProperty
and other Jetleaf logging utilities
consult this registry to resolve effective configuration values.
Key Features
- Stores arbitrary string-based configuration properties.
- Provides bulk and single property setters with overwrite control.
- Offers flag evaluation via
getFlag
. - Exposes an immutable view of all stored properties with asMap.
Usage
// Setting global log properties:
LogProperties.instance.setProperty("logging.level.core", "debug");
LogProperties.instance.setProperty("logging.enabled.core", "true");
// Reading from within a LogProperty mixin:
final global = LogProperties.instance;
print(global.getFlag("logging.enabled.core")); // true
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
asMap(
) → Map< String, String> - Returns an immutable snapshot of all stored log properties.
-
clear(
) → void - Clears all global logging properties.
-
getProperty(
String key) → String? -
Retrieves the string value for the given
key
. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
setProperties(
Map< String, String> map, {bool overwrite = true}) → void -
Performs a bulk update of properties using a
map
of key–value pairs. -
setProperty(
String key, String value, {bool overwrite = true}) → void -
Sets a single property identified by
key
to the specifiedvalue
. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- instance → LogProperties
-
The singleton instance of LogProperties.
no setter