Protected StaticlogProtected StaticloggerProtected StaticlevelProtected Static OptionaloverrideStaticsetGlobally set the logging level for all Rule engine classes.
the level at which to start logging events.
StaticsetStaticgetStaticcanProtected StaticperformProtected StaticperformStatictraceStaticdebugStaticinfoStaticwarnStaticerrorStaticfatalStaticlogStaticflushStaticregisterRegister a new bridge to connect your preferred logging library through an ILogger implementation.
the local identifier for the bridge.
an implementation of ILogger to register.
StaticunregisterRemove a previously connected bridge to an external logging library.
the identifier of the bridge (used to register).
StaticregisteredList the currently registered loggers.
a map of logger identifiers to their ILogger implementations.
StaticoverrideOverride the current logger implementation with a custom logger.
This is useful for temporarily redirecting all log events to a specific logger.
You should not need to call this method directly.
Instead, use the withLogger helper function to execute a block of code with a temporary logger override.
the custom logger to use.
StaticresetReset any active logger override, returning to the default logging behavior. You should not need to call this method directly.
Main class to handle and configure logging with multiple logger implementations. Unlike Logger implementations, this class provides static methods to manage global logging configuration and registered loggers, as well as helper functions to create ContextLoggers and temporarily override loggers for specific code blocks.
You can also register multiple loggers that implement the ILogger interface, which will all receive the log events that pass the log level filter. If no loggers are registered, a default ConsoleLogger will be used to output to the console.
The LogLevel can be set globally for all loggers through the
setLogLevelmethod, which will filter out any log events below the specified level. Each registered Logger instance can have its own level, but none can bypass the global level set by this class.If you need to temporarily redirect all log events to a specific logger for a block of code, you can use the
withLoggerhelper function, which will override the logger implementation during the execution of the provided function and reset it afterward.