Thanks! This is very helpful! Best regards, Elisabeth
2016-08-25 17:07 GMT+02:00 Shawn Heisey <apa...@elyograg.org>: > On 8/24/2016 6:01 AM, elisabeth benoit wrote: > > I was wondering was is the right way to prevent solr 5 from creating a > new > > log file at every startup (and renaming the actual file mv > > "$SOLR_LOGS_DIR/solr_gc.log" "$SOLR_LOGS_DIR/solr_gc_log_$(date > > +"%Y%m%d_%H%M")" > > I think if you find and comment/remove the command in the startup script > that renames the logfile, that would do it. The default log4j config > will rotate the logfiles. You can comment the first part of the > bin/solr section labeled "backup the log files before starting". I > would recommend NOT commenting the next part, which rotates the garbage > collection log. > > You should also modify server/resources/log4j.properties to remove all > mention of the CONSOLE output. The console logfile is created by shell > redirection, which means it is never rotated and can fill up your disk. > It's a duplicate of information that goes into solr.log, so you don't > need it. This means removing ", CONSOLE" from the log4j.rootLogger line > and entirely removing the lines that start with log4j.appender.CONSOLE. > > You might also want to adjust the log4j.appender.file.MaxFileSize line > in log4j.properties -- 4 megabytes is very small, which means that your > logfile history might not cover enough time to be useful. > > Dev note:I think we really need to include gc logfile rotation in the > startup script. If the java heap is properly sized, this file won't > grow super-quickly, but it WILL grow, and that might cause issues. I > also think that the MaxFileSize default in log4j.properties needs to be > larger. > > Thanks, > Shawn > >