[
https://issues.apache.org/jira/browse/PROTON-772?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14250729#comment-14250729
]
ASF subversion and git services commented on PROTON-772:
--------------------------------------------------------
Commit a72202d4f4c02221c6555a9e76480d383c7398c8 in qpid-proton's branch
refs/heads/master from [~aconway]
[ https://git-wip-us.apache.org/repos/asf?p=qpid-proton.git;h=a72202d ]
PROTON-772: New proton logging code
Based on list discussion:
- moved the log statement api into src/log_private
- simplified the public API to 2 functions: pn_log_enable and pn_log_logger
The minimal public API is required to let applications using proton control
where proton log output goes, which is the point of all this.
The present state of the logging achieves the following goals:
- allow applications to disable or redirect ALL proton library output, nothing
is forced to stderr.
- leaves the previous behavior of transport tracers unaffected.
- introduces as little disturbance as possible (one new env. var PN_TRACE_LOG
and 2 new API functions)
This is definitely not the final word on logging for proton, but a more
sophisticated, unified logging system requires more discussion in the proton
community.
> Remove all direct printing to stdout and stderr.
> ------------------------------------------------
>
> Key: PROTON-772
> URL: https://issues.apache.org/jira/browse/PROTON-772
> Project: Qpid Proton
> Issue Type: Bug
> Components: proton-c
> Affects Versions: 0.8
> Reporter: Alan Conway
> Assignee: Alan Conway
> Fix For: 0.3
>
>
> A library should never, ever print anything directly to stdout/stderr unless
> explicitly requested to do so, as it may be linked with programs that need to
> control what they output to stdout/err or programs that have no stdout/err at
> all.
> Failures should be raised via the API error mechanism with appropriate
> message strings that the caller can display as they see fit. Informational
> log messages should be logged in a way that the caller can send them where
> they want or turn them off if they want.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)