Create a new ContextLogger for a specific working context.
N.B. If you need to use the loggers registered in Logger, you can create a ContextLogger through getContextLogger()
to automatically register all loggers from Logger to the new ContextLogger.
the working context to associate with this logger.
Set the minimum log level for this logger. Messages with a lower log level will be ignored.
the minimum log level to set.
Check if a message at the given log level would be logged by the current logger configuration.
the log level to check.
ProtectedperformProtectedaddProtectedperformRegister 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.
Remove a previously connected bridge to an external logging library.
the identifier of the bridge (used to register).
Flush all logged events to the registered loggers, writing them using any registered loggers. This allows you to control when the events are actually logged, for example after a certain operation is completed or when an error occurs.
Logger implementation to handle and configure logging for a specific working context. This allows you to log events related to that context and manage them separately from other contexts.
N.B. This does not immediately write to the registered loggers, it stores the events in a local array until the flush method is called. This allows you to control when the events are actually logged, for example after a certain operation is completed or when an error occurs.
N.B. If you need to use the loggers registered in Logger, you can create a ContextLogger through
getContextLogger()to automatically register all loggers from Logger to the new ContextLogger. You can also register and unregister loggers directly to a ContextLogger, which will not affect the loggers registered in Logger or other ContextLoggers.