[Log4cplus-devel] Custom Appenders using Properties?
Logging Framework for C++
Brought to you by:
wilx
From: Nate R. <gn...@ho...> - 2011-04-07 00:27:14
|
I've subclassed FileAppender with my own custom class and I would like to use the log4cplus properties system to configure the logging to use the custom class. The problem is that it appears that the custom class needs to be registered with the AppenderFactory. However, it looks like the registration, although done at runtime with the call to initializeFactoryRegistry() from src/factory.cxx does the trick, it only registers the Appenders/etc that it's aware of. It also looks like the FactoryTemp and support classes are an implementation detail of factory.cxx and do not appear to be accessible externally. E.g. they are not defined in the factory header file. Is there a way to register custom Appenders/etc so that they can be used within a Property configuration? I'd like to have something like this: // log.properties log4cplus.rootLogger=DEBUG, Custom log4cplus.appenders.Custom=CustomNS::MyAppender ... Thanks! -Nate P.S. sorry for cross-posting this to the wilx list as well. |