From: Konstantin L. <to....@gm...> - 2009-10-25 20:48:21
|
Stephen Roderick пишет: > The reason I had to replace the default hierarchy maintainer is that I > need to build our own Category objects, which are derived from > log4cpp::Category. The easiest method up front was to copy/paste the > hierarchy maintainer and change just > HierarchyMaintainer::_getInstance. Do you have any recommendations on > how to do this in a better manner than just replacing the entire > class? Has anyone considered use of a Factory pattern, or something > similar? > Why do you need you own Category class? What is wrong with existing? > I opted to change only LoggingEvent (and small amount of other > necessary code) to use the real-time allocatable strings, rather than > change all of log4cpp. This means that from a user point of view, they > really only see std::string. Does this seem reasonable? So you want to modify only core of log4cpp and write your own appenders to do real-time friendly logging? |