Hello,
I am having a problem trying to use
RollingFileAppender. No matter how much logging I try
to do, I get 55 memory leaks reported by Visual Leak
Detector. A common example:
-------------------------------------------
---------- Block 1223 at 0x00DE05E8: 108 bytes
----------
Call Stack:
0x0056852D (File and line number not available):
log4cxx::helpers::ByteBuffer::data
0x004DCAA6 (File and line number not available):
log4cxx::pattern::LiteralPatternConverter::newInstance
0x004FD005 (File and line number not available):
log4cxx::pattern::PatternParser::parse
0x004FA9EE (File and line number not available):
log4cxx::PatternLayout::activateOptions
0x00506259 (File and line number not available):
log4cxx::config::PropertySetter::activate
0x004B93B5 (File and line number not available):
log4cxx::xml::DOMConfigurator::parseLayout
0x004B6B10 (File and line number not available):
log4cxx::xml::DOMConfigurator::parseAppender
0x004B620C (File and line number not available):
log4cxx::xml::DOMConfigurator::findAppenderByName
0x004B6273 (File and line number not available):
log4cxx::xml::DOMConfigurator::findAppenderByName
0x004B6519 (File and line number not available):
log4cxx::xml::DOMConfigurator::findAppenderByReference
0x004B8BB7 (File and line number not available):
log4cxx::xml::DOMConfigurator::parseChildrenOfLoggerElement
0x004B849C (File and line number not available):
log4cxx::xml::DOMConfigurator::parseLogger
0x004BBE8D (File and line number not available):
log4cxx::xml::DOMConfigurator::parse
0x004BB070 (File and line number not available):
log4cxx::xml::DOMConfigurator::doConfigure
0x004BB28B (File and line number not available):
log4cxx::xml::DOMConfigurator::configure
0x100010C5 (File and line number not available):
CCLogger::CCLogger
0x100012C5 (File and line number not available):
CCLogger::getInstance
c:\nattc\sandbox\ust\ustios\src\iosmain.cpp (141):
IosMain::IosMain
c:\nattc\sandbox\ust\ustios\src\iosmain.cpp (96):
main
0x0043A919 (File and line number not available):
WinMain
f:\vs70builds\3077\vc\crtbld\crt\src\crtexe.c
(390): WinMainCRTStartup
0x7C816D4F (File and line number not available):
RegisterWaitForInputIdle
------------------------------------------
My appender is declared like this:
<appender name="FILE"
class="org.apache.log4j.rolling.RollingFileAppender">
<rollingPolicy
class="org.apache.log4j.rolling.FixedWindowRollingPolicy">
<param name="maxIndex" value="5"/>
<param name="fileNamePattern"
value="log4cxx-ios.log.%i"/>
</rollingPolicy>
<triggeringPolicy
class="org.apache.log4j.rolling.SizeBasedTriggeringPolicy">
<param name="MaxFileSize" value="10000"/>
</triggeringPolicy>
<param name="file" value="log4cxx-ios.log"/>
<param name="append" value="true"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d %-5p %-5c
- %m%n"/>
</layout>
</appender>
---------------------------------------------
The logging and rolling 'works', however.
When I use a simple org.apache.log4j.FileAppender I do
not have any leaks.
I am using log4cxx (current svn checkout) by building
it in MS VC++ .net 2003 as a shared .dll.
The application is multi-threaded but I am using
logging only in the main thread.
Is this likely a problem with my configuration or with
RollingFileAppender?
Thanks,
Mark
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com