[ 
https://issues.apache.org/jira/browse/QPID-3891?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13229278#comment-13229278
 ] 

[email protected] commented on QPID-3891:
-----------------------------------------------------


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/4261/#review5941
-----------------------------------------------------------



trunk/qpid/cpp/src/qpid/log/Statement.cpp
<https://reviews.apache.org/r/4261/#comment12903>

    I recommend splitting this out into its own (suitably named) function and 
using that in the constructor here.
    
    Incidentally the comment is incorrect in that there is no "return" per se.
    
    You can make the function static and inline if efficiency is a specific 
concern.


- Andrew


On 2012-03-08 21:52:15, Chug Rolke wrote:
bq.  
bq.  -----------------------------------------------------------
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/4261/
bq.  -----------------------------------------------------------
bq.  
bq.  (Updated 2012-03-08 21:52:15)
bq.  
bq.  
bq.  Review request for qpid, Andrew Stitcher, Alan Conway, and Gordon Sim.
bq.  
bq.  
bq.  Summary
bq.  -------
bq.  
bq.  QPID-3891 C++ Broker --log-function log output is overwhelming. This patch 
trims the BOOST_CURRENT_FUNCTION text down to only the 
namespace-qualified-functionName.
bq.  
bq.  
bq.  This addresses bug QPID-3891.
bq.      https://issues.apache.org/jira/browse/QPID-3891
bq.  
bq.  
bq.  Diffs
bq.  -----
bq.  
bq.    trunk/qpid/cpp/src/qpid/log/Statement.cpp 1297553 
bq.    trunk/qpid/cpp/src/tests/logging.cpp 1297553 
bq.  
bq.  Diff: https://reviews.apache.org/r/4261/diff
bq.  
bq.  
bq.  Testing
bq.  -------
bq.  
bq.  Passes modified Unit test.
bq.  
bq.  
bq.  Thanks,
bq.  
bq.  Chug
bq.  
bq.


                
> C++ Broker --log-function switch injects too much noise into log file
> ---------------------------------------------------------------------
>
>                 Key: QPID-3891
>                 URL: https://issues.apache.org/jira/browse/QPID-3891
>             Project: Qpid
>          Issue Type: Improvement
>          Components: C++ Broker
>    Affects Versions: 0.16
>            Reporter: Chuck Rolke
>            Assignee: Chuck Rolke
>             Fix For: Future
>
>
> 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. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to