log4c rollingpolicy append="true" not happening after calling log4c_fini()

229 views Asked by At

As per our requirement we need to append the logs in a file until the given file size is reached.

before reaching the file size as set 100MB we need to call log4c_fini() and after this we are calling log4c_init().

at this moment a new file is created and all logs are added to the new file

I tried giving the appender name different from the rollingpolicy name but still the same is observed.

below is the log4crc

<rollingpolicy name="rollingpolicy" append="true" type="sizewin" maxsize="100MB" maxnum="10" />
    <appender name="rollingpolicy" type="rollingfile" logdir="/log/c" prefix="logs" layout="dated" rollingpolicy="rollingpolicy" />

The expectation is to append the logs in the first file even after calling log4c_fini() until the maximum file is reached.

0

There are 0 answers