[
https://issues.apache.org/jira/browse/PROTON-2131?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16968980#comment-16968980
]
ASF GitHub Bot commented on PROTON-2131:
----------------------------------------
astitcher commented on pull request #201: PROTON-2131: Introduce new proton
logging API
URL: https://github.com/apache/qpid-proton/pull/201
See [PROTON-2131](https://issues.apache.org/jira/browse/PROTON-2131) for
some of the problems this API seeks to solve.
This change
- Introduces a new type ```pn_logger_t``` which represents a logger
- The library has a default logger this can be retrieved using
```pn_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.
- In the current proton code every ```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.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> Improved logging API
> --------------------
>
> Key: PROTON-2131
> URL: https://issues.apache.org/jira/browse/PROTON-2131
> Project: Qpid Proton
> Issue Type: New Feature
> Components: proton-c
> Reporter: Andrew Stitcher
> Assignee: Andrew Stitcher
> Priority: Major
>
> Problems with current proton logging:
> * There are multiple logging systems that are not connected
> - {{pn_log_*}} is used for some things that are not connected to an AMQP
> connection (but not all things)
> - pn_transport_t has its own logging system that is the major logging
> system in proton, with an {{pn_transport_logf()}} and friends API and an
> ability to sink the log its output log messages using
> {{pn_transport_set_tracer()}}. However not everything that might need to
> log messages is connected to a {{pn_transport_t}} so it makes a lot more
> sense for logging to be its own system that the {{pn_transport_t}} is
> connected to rather than the other way around.
> * The logging only has a set of vague somewhat amorphous trace flags to
> decide which messages get logged. Currently the only coherent use for
> this subsystem is to set the environment variable {{PN_TRACE_FRM}} to get
> AMQP frame traces. There are other environment variable which produce
> output (and flags can be set programmatically by client programs) but
> which flags produce what output is not very systematic. There is no way
> to output only logging related to SSL/TLS for example.
> * The callback function that an application can attach to receive the
> log messages only gets the message and maybe the {{pn_transport_t}} that is
> associated, but no indication of the severity or what pert of the
> library it came from.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]