Ass*_*vie 6 c++ logging log4cxx
是否可以为log4cxx编写自定义appender并通过属性文件(如内置的appender)进行配置?如果可能的话,我更喜欢这样做,而不必重建log4cxx(例如,通过派生/扩展现有的appender).
你能指点我一个例子吗?
您可以从AppenderSkeleton或WriterAppender继承并获得相同的基础行为,而无需重建log4cxx.
http://svn.apache.org/viewvc/incubator/log4cxx/trunk/src/test/cpp/vectorappender.h?view=markup http://svn.apache.org/viewvc/incubator/log4cxx/trunk/src /test/cpp/vectorappender.cpp?view=markup