[ 
https://issues.apache.org/jira/browse/SOLR-9570?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15527078#comment-15527078
 ] 

Shawn Heisey commented on SOLR-9570:
------------------------------------

I think we could avoid creating a console logfile at all in most conditions, 
and not worry about rotating it at all.  Here's what I think should happen with 
the console logging:

 * background, console NOT muted: redirect to console log.
 * background, console muted:  redirect to /dev/null.
 * foreground: don't mute.  Output to console, do not redirect or copy to 
console log.

I don't know whether the first condition would ever actually happen, but if it 
can happen, we could have console log rotation *only* in that situation, 
rotating the console log through a fixed and limited set of filenames where the 
oldest one is simply deleted.

The main log is rotated by log4j, but the script currently renames the active 
log on startup, so that a fresh log is always from server start.  If a 
predictable string of text is logged *only* at service start and can be found 
with a backwards search from the end of the file, we might not need to have the 
script rename solr.log at startup.  If log4j can do startup rotation, that 
would take care of the issue entirely.

I'll take your word on the GC log.  I haven't looked into it.

> 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: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to