diff --git a/solr/bin/solr b/solr/bin/solr index f6c723adc560..7fddceb8f95a 100755 --- a/solr/bin/solr +++ b/solr/bin/solr @@ -2028,7 +2028,7 @@ if [ "$GC_LOG_OPTS" != "" ]; then if [ "$JAVA_VENDOR" == "IBM J9" ]; then gc_log_flag="-Xverbosegclog" fi - GC_LOG_OPTS+=("$gc_log_flag:$SOLR_LOGS_DIR/solr_gc.log" '-XX:+UseGCLogFileRotation' '-XX:NumberOfGCLogFiles=9' '-XX:GCLogFileSize=20M') + GC_LOG_OPTS+=("$gc_log_flag:$SOLR_LOGS_DIR/solr_gc-%t.log" '-XX:+UseGCLogFileRotation' '-XX:NumberOfGCLogFiles=9' '-XX:GCLogFileSize=20M') else # http://openjdk.java.net/jeps/158 for i in "${!GC_LOG_OPTS[@]}"; @@ -2036,7 +2036,7 @@ if [ "$GC_LOG_OPTS" != "" ]; then # for simplicity, we only look at the prefix '-Xlog:gc' # (if 'all' or multiple tags are used starting with anything other then 'gc' the user is on their own) # if a single additional ':' exists in param, then there is already an explicit output specifier - GC_LOG_OPTS[$i]=$(echo ${GC_LOG_OPTS[$i]} | sed "s|^\(-Xlog:gc[^:]*$\)|\1:file=$SOLR_LOGS_DIR/solr_gc.log:time,uptime:filecount=9,filesize=20M|") + GC_LOG_OPTS[$i]=$(echo ${GC_LOG_OPTS[$i]} | sed "s|^\(-Xlog:gc[^:]*$\)|\1:file=$SOLR_LOGS_DIR/solr_gc-%t.log:time,uptime:filecount=9,filesize=20M|") done fi fi