[
https://issues.apache.org/jira/browse/SOLR-9570?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15526127#comment-15526127
]
Jan Høydahl commented on SOLR-9570:
-----------------------------------
Actually my plan is as follows:
For the main solr.log I propose to stop moving the old log before startup, and
instead rely on log4j's default of continuing to append the existing file.
Although it is nice with a new file on each startup, I don't think it is a
must? This single change will fix the issue. You can just search for "Welcome
to Apache Solr" to find each new startup.
Wrt the solr_gc.log I'm also going to enable log rotation, which is supported
since JRE7. But the gc log rotation works differently, it will first write to
{{solr_gc.log.0.current}} until size limit and then rename it to
{{solr_gc.log.0}} and start writing {{solr_gc.log.1.current}} etc. On every
restart it unfortunately always starts overwriting {{solr_gc.log.0.current}}.
One option could be to on startup create {{$SOLR_LOGS_DIR/old/}} (or wipe it if
exists) and move all current gc logs there.
> Logs backed up on restart are kept forever
> ------------------------------------------
>
> Key: SOLR-9570
> URL: https://issues.apache.org/jira/browse/SOLR-9570
> Project: Solr
> Issue Type: Bug
> Security Level: Public(Default Security Level. Issues are Public)
> Components: scripts and tools
> Reporter: Jan Høydahl
>
> When (re)starting Solr, the start script will backup any existing
> {{solr.log}} or {{solr_gc.log}} to a file {{solr_log_<date>}} and
> {{solr_gc_log_<date>}} respectively. That may be all good, but these old
> copies are never cleaned up, as they are not under the control of log4j.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]