LuciadCPillar C# 2023.1.04
|
Backend for the logging in this library. More...
Public Member Functions | |
void | DeleteLogger (object handle) |
Indicates that the logger with the given handle is not used anymore. More... | |
bool | IsEnabled (object handle, LogLevel level) |
Returns whether logging output is enabled for the specified logger at the given level. More... | |
void | Log (object handle, LogLevel level, string message) |
This function will not be called if level is not enabled for logger. More... | |
void | Log (object handle, LogLevel level, string message, System.Exception exception) |
object | NewLogger (string name) |
Creates a new handle for a logger with the given name. More... | |
Backend for the logging in this library.
Users can implement this backend to delegate the internal logging to their framework of choice. The implementation must then be configured during global initialization in order to be used by this library. Implementations must be thread-safe. All methods will be called concurrently from various threads. Note that the only purpose of this interface is to facilitate redirecting the logging performed by this library. We expect that, in your own code, you use your framework of choice directly.
void Luciad.ILoggingBackend.DeleteLogger | ( | object | handle | ) |
Indicates that the logger with the given handle is not used anymore.
Implementations could delete the corresponding resource, if any.
handle
a handle previously returned by newLogger(std::string)
bool Luciad.ILoggingBackend.IsEnabled | ( | object | handle, |
Luciad::LogLevel | level | ||
) |
Returns whether logging output is enabled for the specified logger at the given level.
handle
identifies a logger
level
a specific logging level
whether logging output is enabled for the specified logger at the given level
void Luciad.ILoggingBackend.Log | ( | object | handle, |
Luciad::LogLevel | level, | ||
string | message | ||
) |
This function will not be called if level is not enabled for logger.
handle
identifies a logger
level
a specific logging level
message
the message to log
isEnabled()
void Luciad.ILoggingBackend.Log | ( | object | handle, |
LogLevel | level, | ||
string | message, | ||
System.Exception | exception | ||
) |
object Luciad.ILoggingBackend.NewLogger | ( | string | name | ) |
Creates a new handle for a logger with the given name.
At any time, at most one Handle is requested for a given name. This means that, unless a previously returned handle for a name is deleted , this function will be not be called again with that same name.
name
the name of the logger that is requested
a handle for the new logger