Chuck Rolke created QPID-5495:
---------------------------------
Summary: C++ Messaging Client Logger: which options get processed?
Key: QPID-5495
URL: https://issues.apache.org/jira/browse/QPID-5495
Project: Qpid
Issue Type: Bug
Components: C++ Client
Affects Versions: 0.27
Reporter: Chuck Rolke
The Logger.h file is unclear about what parts of argc and argv get processed.
Specifically arg\[0\] in the list is ignored and generally unrecognized args
are (usually) silently ignored. Consider the following calls:
{code}
const char* moArgs[]={"--log-enable", "debug+"};
Logger::configure(2, moArgs);
{code}
In this case the "--log-enable is ignored" and the "debug+" is ignored so
nothing happens.
{code}
const char* moArgs[]={"", "--log-enable", "debug+"};
Logger::configure(3, moArgs);
{code}
This works to enable debug+ as expected.
{code}
const char* moArgs[]={"", "--log-enable", "debug+", "fubar"};
Logger::configure(4, moArgs);
{code}
This works to enable debug+ but ignores the weird switch.
None of these behaviors is really terrible but clearer descriptions of how they
are intended to be used would be helpful. Consider changing Logger::configure
from void to bool indicating that all the args were processed.
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]