Uploaded image for project: 'Qpid'
  1. Qpid
  2. QPID-5495

C++ Messaging Client Logger: which options get processed?

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 0.27
    • None
    • C++ Client
    • None

    Description

      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:

              const char* moArgs[]={"--log-enable", "debug+"};
              Logger::configure(2, moArgs);
      

      In this case the "--log-enable is ignored" and the "debug+" is ignored so nothing happens.

              const char* moArgs[]={"", "--log-enable", "debug+"};
              Logger::configure(3, moArgs);
      

      This works to enable debug+ as expected.

              const char* moArgs[]={"", "--log-enable", "debug+", "fubar"};
              Logger::configure(4, moArgs);
      

      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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            chug Charles E. Rolke
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: