[
https://issues.apache.org/jira/browse/QPID-5494?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13876813#comment-13876813
]
Andrew Stitcher commented on QPID-5494:
---------------------------------------
The is not an error.
The word prefix is ambiguous and in this piece of work is intended to add a
prefix to the command line options.
The point here is to create a "namespace" for the command line options accepted
by the Logger library. If we don't do this we prevent the user from using the
command line option names that he might want to use himself.
If he is happy to use the unprefixed name then he need not specify a prefix.
There is no need to add a prefix to the message itself since there is already a
flag to tell the users code processing the log messages whether it is a library
or application message.
> C++ Messaging Client Logger: configured prefix changes CLI options?
> -------------------------------------------------------------------
>
> Key: QPID-5494
> URL: https://issues.apache.org/jira/browse/QPID-5494
> Project: Qpid
> Issue Type: Bug
> Components: C++ Client
> Affects Versions: 0.27
> Reporter: Chuck Rolke
>
> There's an error in how the configured prefix (function configure() in
> qpid/cpp/include/qpid/messaging/Logger.h) works. Setting the prefix should
> add the prefix value to log messages. This lets a user add annotation to log
> messages so that when several log message streams are mixed together the
> streams can be sorted out.
> Instead the prefix appears to add the prefix value to the command line
> options. For example:
> {code}
> Logger::configure(0, (const char**)0, "foobar");
> std::cout << Logger::usage() << std::endl;
> {code}
> produces the output
> {code}
> --foobar-log-enable RULE (notice+) Enables logging for selected levels
> and
> ...
> --foobar-log-disable RULE Disables logging for selected levels
> ...
> --foobar-log-time yes|no (0) Include time in log messages
> --foobar-log-level yes|no (0) Include severity level in log messages
> --foobar-log-source yes|no (0) Include source file:line in log
> messages
> --foobar-log-thread yes|no (0) Include thread ID in log messages
> --foobar-log-function yes|no (0) Include function signature in log
> messages
> --foobar-log-hires-timestamp yes|no (0)
> Use hi-resolution timestamps in log
> messages
> --foobar-log-to-stderr yes|no (0) Send logging output to stderr
> --foobar-log-to-stdout yes|no (0) Send logging output to stdout
> --foobar-log-to-file FILE Send log output to FILE.
> {code}
> Why would a user want to change the text of the command line options? How is
> this supposed to be used?
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]