logging-log4cxx-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John Reynolds" <John.Reyno...@flightman.com>
Subject Abstraction and static
Date Wed, 22 Feb 2006 10:16:57 GMT
Hi all,
 
As a newbie to log4cxx please forgive me if I am talking out of my arse
and I am having difficulty in formulating my thoughts this morning (need
more caffine).
 
For most of my code I like to abstract third party libraries (by
wrapping such library functionality) from my code so I can switch such
libraries with ease. With log4cxx it seems I can not do this due to the
logger name being tied to my source code class by 
 
class Bar
{
     static log4cxx::LoggerPtr logger;
}
 
which is static as getLogger requires a static.
 
Is there a way of creating an instance of my abstraction logger class
(an instance for each class) and pass in the name and call getLogger
with that name.
 
I hope that this is clear enough to understand.
 
Many Thanks
 
John 

Mime
View raw message