Jan Høydahl updated SOLR-8186:
    Attachment: SOLR-8186.patch

Attached patch with the following:

* New option {{-Dsolr.log.muteconsole}} which is passed when starting in 
foreground mode ({{-f}}). This will programatically disable the {{CONSOLE}} 
logger (in SolrDispatchFilter.init), causing the {{solr-8983-console.log}} to 
only contain stdout/stderr logs (except for the first few lines before the 
logger is disabled).
* Removed some excess Jetty logging by setting default level for 
{{org.eclipse.jetty=WARN}} and {{org.eclipse.jetty.server=INFO}}
* Removed annoying log line {{o.e.j.s.SecurityHandler ... has uncovered http 
methods for path: /}} by extending web.xml
* Removed annoying log line {{o.a.s.c.CoreContainer Couldn't add files from 
/opt/solr/server/solr/lib to classpath:}} when libPath is the hardcoded {{lib}}
* Now printing full date&time also for CONSOLE log

I decided to do the dynamic disabling of CONSOLE logger instead of having 
multiple {{log4j.properties}} files floating around, meaning that the muting 
will work also for custom logger configs, as long as the console logger is 
named {{CONSOLE}}. This is more flexible.

> Solr start scripts -- only log to console when running in foreground
> --------------------------------------------------------------------
>                 Key: SOLR-8186
>                 URL: https://issues.apache.org/jira/browse/SOLR-8186
>             Project: Solr
>          Issue Type: Improvement
>          Components: scripts and tools
>    Affects Versions: 5.3.1
>            Reporter: Shawn Heisey
>            Assignee: Jan Høydahl
>              Labels: logging
>             Fix For: 6.3, master (7.0)
>         Attachments: SOLR-8186.patch
> Currently the log4j.properties file logs to the console, and the start 
> scripts capture console output to a logfile that never rotates.  This can 
> fill up the disk, and when the logfile is removed, the user might be alarmed 
> by the way their memory statistics behave -- the "cached" memory might have a 
> sudden and very large drop, making it appear to a novice that the huge 
> logfile was hogging their memory.
> The logfile created by log4j is rotated when it gets big enough, so that 
> logfile is unlikely to fill up the disk.
> I propose that we copy the current log4j.properties file to something like 
> log4j-foreground.properties, remove CONSOLE logging in the log4j.properties 
> file, and have the start script use the alternate config file when running in 
> the foreground.  This way users will see the logging output when running in 
> the foreground, but it will be absent when running normally.

This message was sent by Atlassian JIRA

To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to