proton
0
|
Control log messages that are not associated with a transport. More...
Go to the source code of this file.
Typedefs | |
typedef void(* | pn_logger_t) (const char *message) |
Callback for customized logging. More... | |
Functions | |
PN_EXTERN void | pn_log_enable (bool enabled) |
Enable/disable global logging. More... | |
PN_EXTERN void | pn_log_logger (pn_logger_t logger) |
Set the logger. More... | |
Control log messages that are not associated with a transport.
See pn_transport_trace for transport-related logging.
typedef void(* pn_logger_t) (const char *message) |
Callback for customized logging.
PN_EXTERN void pn_log_enable | ( | bool | enabled | ) |
Enable/disable global logging.
By default, logging is enabled by envionment variable PN_TRACE_LOG. Calling this function overrides the environment setting.
PN_EXTERN void pn_log_logger | ( | pn_logger_t | logger | ) |
Set the logger.
By default a logger that prints to stderr is installed.
logger | is called with each log messsage if logging is enabled. Passing 0 disables logging regardless of pn_log_enable() or environment settings. |