[
https://issues.apache.org/jira/browse/SOLR-8232?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14994027#comment-14994027
]
Erick Erickson commented on SOLR-8232:
--------------------------------------
+1 on piping console logging to dev/nul in the bin/start script when
starting in the background. There's no reason that I can see for
logging it twice and it's trappy.
When running in foreground we should still send it out IMO. That gives
us the option of collection a very long log file easily. I've often tried
to "get the logs" and found that the 4M rotation size thwarts me, and
running in foreground and piping console to a log gives me an easy
way to work with someone and get _all_ the output from forever
in those cases.
Sure, I could have them change the log rotation size, but running in
foreground and piping is easier I think.
The same need would be served by a script flag that does what
happens currently, i.e. pipes to a console log file that grows
forever but defaults to sending it to dev/nul
> bin/solr does not rotate console log file
> -----------------------------------------
>
> Key: SOLR-8232
> URL: https://issues.apache.org/jira/browse/SOLR-8232
> Project: Solr
> Issue Type: Bug
> Components: scripts and tools
> Affects Versions: 5.3
> Reporter: Upayavira
> Priority: Minor
>
> The bin/solr script, when started with bin/solr start, uses this command to
> start Solr:
> {code} nohup "$JAVA" "${SOLR_START_OPTS[@]}" $SOLR_ADDL_ARGS -jar start.jar \
> "-XX:OnOutOfMemoryError=$SOLR_TIP/bin/oom_solr.sh $SOLR_PORT
> $SOLR_LOGS_DIR" "${SOLR_JETTY_CONFIG[@]}" \
> 1>"$SOLR_LOGS_DIR/solr-$SOLR_PORT-console.log" 2>&1 & echo $! >
> "$SOLR_PID_DIR/solr-$SOLR_PORT.pid"
> {code}
> This sends console output to stdout, with no means of rotating the log file,
> meaning it will eventually fill the drive unless restarted.
> I would propose that stdout be written to dev/null and we use proper means
> for handling logging, which can do proper log rotation as configured by the
> user.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]