Hi,

> And that's the point: There's no logic or API to delete loggers and
> during reloading a configuration file the repository is not
> automatically reset, which means changes are only added or existing
> objects reconfigured. Deleted loggers are not recognized as such and
> stay in the repo.

Log4j has the:
log4j.appender.example.MaxFileSize=500KB
log4j.appender.example.MaxBackupIndex=10

(xml file should be ~ the same)

I know this was in plan to implement of not already. This is the proper way
to keep the logs small. Do not delete them manually if you do not want to
restart the app.

>
> The only option you seem to have is to do as I said before: Override
> the used file watcher and reset the repo on your own. This way each
> reload of the configuration file starts newly from scratch.

You also have DailyRollingFileAppender to start a new file each day (read
the manual).

To start a new file each restart you have:
<param name="append" value="false" />

If these don't work, there is a bug.

Regards,
Alex

Reply via email to