Represents the object that actually writes the log messages to the target. Each Logger Sink is responsible for only single target: file, console etc. More...
Represents the object that actually writes the log messages to the target. Each Logger Sink is responsible for only single target: file, console etc.
Logger Sink allows to set up a threshold log severity level, so the messages with lower level will not be written to the target.
Additionally, it provides the ability to customize format for messages written to the target, see setPattern
method.
Public Member Functions | |
virtual ErrCode INTERFACE_FUNC | setLevel (LogLevel level)=0 |
Sets the minimal severity level of messages to be written to the target. More... | |
virtual ErrCode INTERFACE_FUNC | getLevel (LogLevel *level)=0 |
Gets the minimal severity level of messages to be written to the target. More... | |
virtual ErrCode INTERFACE_FUNC | shouldLog (LogLevel level, Bool *willLog)=0 |
Checks whether the messages with given log severity level will be written to the target or not. More... | |
virtual ErrCode INTERFACE_FUNC | setPattern (IString *pattern)=0 |
Sets the custom formatter pattern for the sink. More... | |
virtual ErrCode INTERFACE_FUNC | flush ()=0 |
Triggers writing out the messages from temporary buffers to the target. | |
![]() | |
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... | |
Gets the minimal severity level of messages to be written to the target.
[out] | level | The log severity level of the sink. |
Sets the minimal severity level of messages to be written to the target.
level | The log severity level of the sink. |
Sets the custom formatter pattern for the sink.
pattern | The formatter pattern string. |
Checks whether the messages with given log severity level will be written to the target or not.
level | The severity level of messages. | |
[out] | willLog | True if the messages with level will be written to the target; false otherwise. |