Logs messages produced by a specific part of openDAC SDK. The messages are written into the Logger Sinks associated with the Logger Component object. More...
Logs messages produced by a specific part of openDAC SDK. The messages are written into the Logger Sinks associated with the Logger Component object.
The set of associated sinks is initialized on the Logger Component object creation and cannot be changed after.
Logger Component allows to set up a threshold log severity level, so the messages with lower level will not be registered. Additionally, it provides the ability to trigger writing out messages stored in temporary buffers or set up the minimum severity level of messages to be written out automatically, see flushOnLevel
method.
Public Member Functions | |
virtual ErrCode INTERFACE_FUNC | getName (IString **name)=0 |
Gets the name of the component. More... | |
virtual ErrCode INTERFACE_FUNC | setLevel (LogLevel level)=0 |
Sets the minimal severity level of messages to be logged by the component. More... | |
virtual ErrCode INTERFACE_FUNC | getLevel (LogLevel *level)=0 |
Gets the minimal severity level of messages to be logged by the component. More... | |
virtual ErrCode INTERFACE_FUNC | logMessage (SourceLocation location, ConstCharPtr msg, LogLevel level)=0 |
Logs a message with the provided source location and severity level. More... | |
virtual ErrCode INTERFACE_FUNC | setPattern (IString *pattern)=0 |
Sets the custom formatter pattern for the component. More... | |
virtual ErrCode INTERFACE_FUNC | shouldLog (LogLevel level, Bool *willLog)=0 |
Checks whether the messages with given log severity level will be logged or not. More... | |
virtual ErrCode INTERFACE_FUNC | flush ()=0 |
Triggers writing out the messages stored in temporary buffers. | |
virtual ErrCode INTERFACE_FUNC | flushOnLevel (LogLevel level)=0 |
Sets the minimum severity level of messages to be automatically written to the associated sinks bypassing the temporary buffers. More... | |
![]() | |
virtual ErrCode INTERFACE_FUNC | borrowInterface (const IntfID &intfID, void **obj) const =0 |
Returns another interface which is supported by the object without incrementing the reference count. More... | |
virtual ErrCode INTERFACE_FUNC | dispose ()=0 |
Disposes all references held by the object. More... | |
virtual ErrCode INTERFACE_FUNC | getHashCode (SizeT *hashCode)=0 |
Returns hash code of the object. More... | |
virtual ErrCode INTERFACE_FUNC | equals (IBaseObject *other, Bool *equal) const =0 |
Compares object to another object for equality. More... | |
virtual ErrCode INTERFACE_FUNC | toString (CharPtr *str)=0 |
Returns a string representation of the object. More... | |
![]() | |
virtual ErrCode INTERFACE_FUNC | queryInterface (const IntfID &intfID, void **obj)=0 |
Returns another interface which is supported by the object and increments the reference count. More... | |
virtual int INTERFACE_FUNC | addRef ()=0 |
Increments the reference count for an interface on an object. More... | |
virtual int INTERFACE_FUNC | releaseRef ()=0 |
Decrements the reference count for an interface on an object. More... | |
Sets the minimum severity level of messages to be automatically written to the associated sinks bypassing the temporary buffers.
level | The severity level of messages. |
Gets the minimal severity level of messages to be logged by the component.
[out] | level | The log severity level of the component. |
Gets the name of the component.
[out] | name | The name of the component. |
|
pure virtual |
Logs a message with the provided source location and severity level.
location | The source location. |
msg | The message. |
level | The severity level of the message. |
Sets the minimal severity level of messages to be logged by the component.
level | The log severity level of the component. |
Sets the custom formatter pattern for the component.
pattern | The format pattern string. |
Checks whether the messages with given log severity level will be logged or not.
level | The severity level of messages. | |
[out] | willLog | True if the messages with level will be logged within the component; false otherwise. |