Chuck Rolke created QPID-5494:
---------------------------------

             Summary: 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]

Reply via email to