Jan H√łydahl commented on SOLR-8186:

Is this still the case?

Do we even need to write to {{logs/solr.log}} when running in foreground mode? 
If not, the {{log4j-foreground.properties}} could do CONSOLE only.

Also, why does the log format need to be different between console and file? I 
know some Windows users start Solr with NSSM in foreground mode and relies on 
NSSM to capture console logging and take care of persisting and rolling the 
logs. You would expect to find a timestamp in those logs!

2016-09-19 13:42:46.607 INFO  (main) [   ] o.e.j.u.log Logging initialized 
2016-09-19 13:42:46.772 INFO  (main) [   ] o.e.j.s.Server jetty-9.3.8.v20160314

0    INFO  (main) [   ] o.e.j.u.log Logging initialized @361ms
165  INFO  (main) [   ] o.e.j.s.Server jetty-9.3.8.v20160314

> 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
> 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