On 10/22/2015 12:24 AM, Shalin Shekhar Mangar wrote:
> Should we remove the console appender by default? This is very trappy I guess.

The only time we should need console logging is when Solr is run in the
foreground, and in that case, it should not be saved to a file, just
printed on the console.  The log4j console output contains the same
information as the rotated logfile, so even when Solr is run in the
background, I think it's completely unnecessary to save it.

We do need to save console output in the startup script when running in
the background, because startup problems and some kinds of developer
debug output are likely to be reported there.

The start script should be able to use a different log4j config file
that logs to the console when running in the foreground.  Looking at the
bash script, that will probably require a little bit of rework on the
script flow, but shouldn't be particularly difficult.  I have not looked
at the Windows script.

When I wrote my own init scripts a few years back, I was using log4j
before the official switch in 4.3.0, and I was only sending log4j output
to a file, not the console.

My init script sent stdout and stderr to different files -- "logs/out"
and "logs/err".  I like this arrangement, but I wonder if that's too
much complexity for the general case.

I opened SOLR-8186 for the enhancement idea.

Thanks,
Shawn

Reply via email to