logging-log4cxx-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "log4cxx" <log4...@gallandfamily.com>
Subject Re: Log file size grows larger than the size configured using log4j.appender.R.MaxFileSize
Date Thu, 25 Aug 2011 14:58:44 GMT
At first we were duplicating log4cxx initialization in our dynamically loaded DLLs as well.
We saw problems with this, so we switched to a single initialization. We were already using
a wrapper class for LoggerPtr. When we load in our dynamically loaded DLLs, we go through
all the wrapper instances and redo Logger::getLogger for the underlying member. 

Hope this helps,

On Tue, Aug 9, 2011 at 5:06 PM, Shyam Pabbathi <spabbath@brocade.com> wrote:



    We are using log4cxx in our application running on Windows. The maximum size for log file
is defined in log4j.properties as follows:




    The log file size goes up to more than 1000 kb to 13gb some times. We have seen this issue
several times, but unable to recreate it consistently.


    Our application consists of two components:


    1. Shared Library file – DLL (It includes the log4cxx, apr libraries statically) and
it has it’s own initialization sequence for log4cxx.


    2. Executable file and it linked to DLL file dynamically mentioned above (It also includes
the log4cxx, apr libraries statically) and it has it’s own initialization sequence for log4cxx).


    Here is the sequence of log4cxx in both executable and DLL:



        log4cxx::File cfgFile("conf/log4j.properties");

        log4cxx::PropertyConfigurator::configureAndWatch(cfgFile, 60000);


    We had to add initialization sequence in both executable and DLL in order to get log message
from both of them (Executable and DLL).


    Any help is appreciated to stop the log file grows more than 1000 kb.


    Note: We never experienced this issue when we link our DLL and executable statically.
But, we have to make our library as DLL as per our requirements.



    -- Shyam

View raw message