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

C++ Broker --log-function switch injects too much noise into log file

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.16
    • Future
    • C++ Broker
    • None

    Description

      When the C++ Broker is started with '--log-function yes' the function name that gets printed is barely usable. From a coding standpoint it's pretty efficient but from a user standpoint raw BOOST_CURRENT_FUNCTION output is too much. For example here is the same log entry printed from two systems:

      Linux:
      2012-03-08 14:09:47 debug std::map<std::basic_string<char>, std::map<qpid::management::ManagementAgent::SchemaClassKey, qpid::management::ManagementAgent::SchemaClass, qpid::management::ManagementAgent::SchemaClassKeyComp> >::iterator qpid::management::ManagementAgent::findOrAddPackageLH(std::string): SEND PackageInd package=org.apache.qpid.broker to=schema.package

      Windows:
      2012-03-06 14:20:05 debug class std::_Tree_iterator<class std::_Tree_val<class std::_Tmap_traits<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::map<struct qpid::management::ManagementAgent::SchemaClassKey,struct qpid::management::ManagementAgent::SchemaClass,struct qpid::management::ManagementAgent::SchemaClassKeyComp,class std::allocator<structstd::pair<struct qpid::management::ManagementAgent::SchemaClassKey const ,struct qpid::management::ManagementAgent::SchemaClass> > >,struct std::less<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const ,class std::map<struct qpid::management::ManagementAgent::SchemaClassKey,struct qpid::management::ManagementAgent::SchemaClass,struct qpid::management::ManagementAgent::SchemaClassKeyComp,class std::allocator<struct std::pair<struct qpid::management::ManagementAgent::SchemaClassKey const ,struct qpid::management::ManagementAgent::SchemaClass> > > > >,0> > > __thiscall qpid::management::ManagementAgent::findOrAddPackageLH(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >): SEND PackageInd package=org.apache.qpid.broker to=schema.package

      This level of detail has no use. An easy improvement is to print only the class and function names and not to print the function return type and the function arguments.

      Trimmed:
      2012-03-06 16:55:38 debug qpid::management::ManagementAgent::findOrAddPackageLH: SEND PackageInd package=org.apache.qpid.broker to=schema.package

      Coincidently, these function names in all their glory are what is used for log message filtering. If one specifies '--log-enable debug+:_Tree_iterator' then the Windows log will be emitted but the Linux log will not. By trimming the function name then Windows and Linux will get the same filter results.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: