How to use Log4Cplus in DLL
What is the best practice to use Log4Cplus in a DLL ?
I want to use a FileAppender.
I have a win32 DLL, that has DLLMain, and 3 exported Function.
Where do I define the Appender and Layout object ? Where to set their
properties ? Where do I link them to a logger ?
I want to use the logger in all classes inside the dll I guess by just
calling: Logger myLogger= Logger::getInstance("myLoggerName"); where
should I put the code so I can have the log4cplus macros enabled and
working in all my functions inside the dll ?
In a normal program I will use global variables, use main or some ctor to
set them up and then everything can see them. What do I do inside a dll ?
No comments:
Post a Comment