[
https://issues.apache.org/jira/browse/LOGCXX-269?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Thorsten Schöning updated LOGCXX-269:
-------------------------------------
Fix Version/s: (was: 0.10.0)
> RollingFileAppender
> -------------------
>
> Key: LOGCXX-269
> URL: https://issues.apache.org/jira/browse/LOGCXX-269
> Project: Log4cxx
> Issue Type: Bug
> Components: Appender
> Affects Versions: 0.10.0
> Environment: Windows XP SP2, VC++6
> Reporter: kim peng quek
> Assignee: Curt Arnold
>
> I downloaded apache-log4cxx-0.10.0.zip, built using the steps in
> http://logging.apache.org/log4cxx/building/vstudio.html
> Then I begun using log4cxx0.10.0 in my VC6 project.
> When I run the application developed using VC6 (MFC), I observed that the Mem
> Usage (windows task manager) increases by an average of 20KB whenever the
> logging file rolls over to another one.
> Here is portions of my code.
> using namespace std;
> using namespace log4cxx;
> using namespace log4cxx::helpers;
> static LoggerPtr g_rootLogger;
> char *g_strconfigFile1;
> PropertyConfigurator::configure(g_strconfigFile1);
> g_rootLogger = Logger::getRootLogger();
> .
> .
> .
> DWORD CmdOutput (....)
> {
> .
> .
> .
> unsigned char *log4cxxBuf;
> log4cxxBuf=new unsigned char[LOG4CXXBUFMAX];
> if(log4cxxBuf!=NULL)
> {
> .
> .
> .
> LOG4CXX_DEBUG(g_rootLogger, "CmdOutput: OutDataBuffer = " <<
> log4cxxBuf);
> .
> .
> .
> delete[] log4cxxBuf;
> }
> else
> dwReturnValue=ERROR_ALLOCATE_MEM;
> return dwReturnValue;
> }
> log4cxx.properties
> logDir=C:/SE/LOG
> log4j.rootLogger=INFO, A1
> log4j.appender.A1=org.apache.log4j.RollingFileAppender
> log4j.appender.A1.File=${logDir}/SE.log
> log4j.appender.A1.MaxFileSize=5MB
> log4j.appender.A1.MaxBackupIndex=1000
> log4j.appender.A1.layout=org.apache.log4j.PatternLayout
> log4j.appender.A1.layout.ConversionPattern=%d{dd MM yyyy HH:mm:ss} %5p %L -
> %m%n
> The CmdOutput function is called continuously in a separate thread until the
> "Stop" button is clicked.
> This could run for weeks and undesirable if memory usage keep increasing.
> Is there any problems with my codes, properties file?
>
> Kindly advice.
> Thanks You.
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)