PROTON-2131: Introduce new proton logging API #201
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
See PROTON-2131 for some of the problems this API seeks to solve.
This change
Introduces a new type
pn_logger_t
which represents a loggerpn_default_logger()
All new loggers will inherit their properties from the default logger at the point they are created. The default logger will also be used for any messages logged outside the context of an AMQP connection.
pn_transport_t
object also has a logger, which will be initialised from the default logger when the transport is created. All messages logged in the context of an AMQP connection will be logged to the connection's transport's logger.The transport's logger can be retreived using
pn_transport_logger()
.Converted all uses in the Proton core library to use the new API
Currently no higher language API bindings (Python/Ruby/C++)
This introduces some portable library infrastructure to globally initialise/
shutdown the library independent of it's clients.