You are viewing a plain text version of this content. The canonical link for it is here.
Posted to proton@qpid.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2014/12/12 03:44:13 UTC
[jira] [Commented] (PROTON-772) Remove all direct printing to
stdout and stderr.
[ https://issues.apache.org/jira/browse/PROTON-772?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14243625#comment-14243625 ]
ASF subversion and git services commented on PROTON-772:
--------------------------------------------------------
Commit 9a72a30cd2762aaa1920300db8298cad30bf7201 in qpid-proton's branch refs/heads/master from [~aconway]
[ https://git-wip-us.apache.org/repos/asf?p=qpid-proton.git;h=9a72a30 ]
PROTON-772: Remove all direct printing to stdout and stderr.
Added a simple log facility in log.h.
Former printfs to stderr, stout now use pn_logf().
Output is enabled by setting envionment variable PN_TRACE_LOG=ON or
by calling: pn_log_init(); pn_log_enable(true);
Default is output to stderr, can provide replacement log function via pn_log_logger()
> 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
>
> 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)