[jira] [Commented] (SOLR-12144) Remove SOLR_LOG_PRESTART_ROTATION and leverage log4j2

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (SOLR-12144) Remove SOLR_LOG_PRESTART_ROTATION and leverage log4j2

JIRA jira@apache.org

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

Jan Høydahl commented on SOLR-12144:
------------------------------------

New patch with a change to the Ref-Guide:
{code:java}
-Java Garbage Collection logs are rotated by the JVM when size hits 20M, for a max of 9 generations. Old GC logs are moved to `SOLR_LOGS_DIR/archived`. These settings can only be changed by editing the start scripts.
+Java Garbage Collection logs are rotated by the JVM when size hits 20M, for a max of 9 generations.
 
-On every startup of Solr, the start script will clean up old logs and rotate the main `solr.log` file. If you changed the `<DefaultRolloverStrategy max="10"/>` setting in `log4j2.xml`, you also need to change the corresponding setting `-rotate_solr_logs 10` in the start script.
-
-You can disable the automatic log rotation at startup by changing the setting `SOLR_LOG_PRESTART_ROTATION` found in `bin/solr.in.sh` or `bin/solr.in.cmd` to false.
+On every startup or restart of Solr, log4j2 performs log rotation. If you choose to use another log framework that does not support rotation on startup, you may enable `SOLR_LOG_PRESTART_ROTATION` in `solr.in.sh` or `solr.in.cmd` to let the start script rotate the logs on startup.
{code}

> Remove SOLR_LOG_PRESTART_ROTATION and leverage log4j2
> ------------------------------------------------------
>
>                 Key: SOLR-12144
>                 URL: https://issues.apache.org/jira/browse/SOLR-12144
>             Project: Solr
>          Issue Type: Improvement
>      Security Level: Public(Default Security Level. Issues are Public)
>          Components: scripts and tools
>            Reporter: Varun Thacker
>            Assignee: Jan Høydahl
>            Priority: Major
>             Fix For: 7.4, master (8.0)
>
>         Attachments: SOLR-12144.patch, SOLR-12144.patch, SOLR-12144.patch
>
>
> With log4j2 rotating the file on restart is as simple as adding a policy - OnStartupTriggeringPolicy
> So we can remove Solr logic which does the same and exposes it via SOLR_LOG_PRESTART_ROTATION .
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]