Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#23 New log level "PERFORMANCE"

closed
darkangel
None
5
2009-05-23
2008-04-06
Anonymous
No

Hello,

I have a feature request. Would it be possible to add a new loglevel called "PERFORMANCE"?

This would be used for one one want to log performance information. Yes, it is possible to use one of the other, existig levels but a lot of times, other information, not related to performance would be logged at those levels. When one is interested in logging performance related data,f.ex. entry and exit from methods one is not interested in other messages.

I would suggest a level between "warn" and "notice".

Best regards,
A. Lenkei

Discussion

  • darkangel
    darkangel
    2008-08-02

    Logged In: YES
    user_id=1600514
    Originator: NO

    I think that PERFORMANCE level is not needed. You can achieve your goal without intoducing a new loglevel to library. Today you need performance level, tomorrow you will need memory level and so on. Log4cpp already offer you powerfull concept of hierarchical loggers with appenders/treshholds/additivity/filtering. Using all thouse features together give you ability to see all data you needed in a form you needed.
    Personaly, for enter/leave timing, I use separate logger A.B.perf_monitor with DEBUG level. When I need to see only performance data I simply do 'grep perf_mo bla.log | less' end see data what I need. It is very simple case. I have never need more complex. You may use shared file appender attached to all *.perf_monitors with additivity=false. There is a hundred of ways to see performance data. You just need to choose the way :).

     
  • darkangel
    darkangel
    2009-05-23

    • assigned_to: nobody --> dark--angel
    • status: open --> closed