Next: Contexts, Previous: Initializing the library, Up: Generalities [Contents][Index]
The default log handler can be configured by the following functions:
Set the prefix to be used at the start of a line emitted by assuan on the log stream to text. The default is the empty string.
Return the prefix to be used at the start of a line emitted by assuan on the log stream. The default implementation returns the empty string.
This sets the default log stream to which
libassuan should log messages not
associated with a specific context to fp. The default is to log
stderr. This default value is also changed by using
assuan_set_log_stream (to set a logging stream for a specific
context) unless this function has been used. Obviously this is not
thread-safe and thus it is highly recommended to use this function to
setup a proper default.
Return the stream which is currently being using for global logging.
The log stream used by the default log handler can also be set on a per context basis.
Enable debugging for the context ctx and write all debugging output to the stdio stream fp. If the default log stream (used for non-context specific events) has not yet been set, a call to this functions implicitly sets this stream also to fp.