Menu

#237 Loggingmacros.h no longer included in logger.h

v1.1.x
wont-fix
macros (2)
5
2013-08-14
2012-11-07
No

In a previous version of the library the include:

#include <log4cplus/loggingmacros.h>

was at the bottom of the main file logging.h. This allowed me to include logging.h and also get the ability to log using the macros LOG4CPLUS_DEBUG, LOG4CPLUS_INFO, etc. In version 1.1 this is no longer the case, requiring me to also provide the above include after my include for logger.h.

Is this intentional? Is there a different main include I should use? It seems strange to me that I would always need to do:

#include <log4cplus/logger.h>
#include <log4cplus/loggingmacros.h>

Discussion

  • Václav Haisman

    Václav Haisman - 2013-01-04

    Yes, this is intentional. I have found the cyclic dependencies between the two headers too untidy so I have broken the dependency by including logger.h in loggingmacros.h. Also, you can actually use log4cplus without the macros. From thi POV, including loggingmacros.h in logger.h is unnecessary.

     
  • Václav Haisman

    Václav Haisman - 2013-01-04
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,8 +1,14 @@
     In a previous version of the library the include:
    -\#include &lt;log4cplus/loggingmacros.h&gt;
    
    -was at the bottom of the main file logging.h. This allowed me to include logging.h and also get the ability to log using the macros LOG4CPLUS\_DEBUG, LOG4CPLUS\_INFO, etc.  In version 1.1 this is no longer the case, requiring me to also provide the above include after my include for logger.h.
    +~~~~~
    +#include <log4cplus/loggingmacros.h>
    +~~~~~
    +
    +was at the bottom of the main file logging.h. This allowed me to include logging.h and also get the ability to log using the macros `LOG4CPLUS_DEBUG`, `LOG4CPLUS_INFO`, etc.  In version 1.1 this is no longer the case, requiring me to also provide the above include after my include for logger.h.
    
     Is this intentional? Is there a different main include I should use? It seems strange to me that I would always need to do:
    -\#include &lt;log4cplus/logger.h&gt;
    -\#include &lt;log4cplus/loggingmacros.h&gt;
    +
    +~~~~~
    +#include <log4cplus/logger.h>
    +#include <log4cplus/loggingmacros.h>
    +~~~~~
    
    • milestone: --> beta
     
  • Václav Haisman

    Václav Haisman - 2013-01-04
    • assigned_to: Václav Zeman
    • milestone: beta --> v1.1.0
     
  • Václav Haisman

    Václav Haisman - 2013-07-14

    Ticket moved from /p/log4cplus/support-requests/36/

     
  • Václav Haisman

    Václav Haisman - 2013-08-14
    • labels: --> macros
    • status: open --> wont-fix
    • Group: v1.1.0 --> v1.0.5
     
  • Václav Haisman

    Václav Haisman - 2013-08-14
    • Group: v1.0.5 --> v1.1.x
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.