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>
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
inloggingmacros.h
. Also, you can actually use log4cplus without the macros. From thi POV, includingloggingmacros.h
inlogger.h
is unnecessary.Diff:
Ticket moved from /p/log4cplus/support-requests/36/