Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SOLR-14142 Enable jetty's request log by default #536

Merged
merged 11 commits into from
Jan 18, 2022
3 changes: 3 additions & 0 deletions solr/CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -481,6 +481,9 @@ Other Changes
* SOLR-14858: Add the server WEB-INF/lib directory to the classpath for the solr-exporter script. Will allow the script
to work when the dist/solrj-lib jars are missing in the Docker image. (Houston Putman)

* SOLR-14142: Jetty's RequestLog is enabled by default. If you don't want these logs, you can disable
via SOLR_REQUESTLOG_ENABLED=false. (rmuir, janhoy)

* SOLR-15924: Remove lucene-libs from contrib module packaging. The lucene libraries will be included in lib/ with all other dependencies. (Houston Putman)

Bug Fixes
Expand Down
2 changes: 1 addition & 1 deletion solr/bin/solr
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ else
fi

# Requestlog options
if [ "$SOLR_REQUESTLOG_ENABLED" == "true" ]; then
if [ "${SOLR_REQUESTLOG_ENABLED:-true}" == "true" ]; then
SOLR_JETTY_CONFIG+=("--module=requestlog")
fi

Expand Down
3 changes: 3 additions & 0 deletions solr/bin/solr.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,9 @@ IF "%SOLR_SSL_ENABLED%"=="true" (
)

REM Requestlog options
IF NOT DEFINED SOLR_REQUESTLOG_ENABLED (
set SOLR_REQUESTLOG_ENABLED=true
)
IF "%SOLR_REQUESTLOG_ENABLED%"=="true" (
set "SOLR_JETTY_CONFIG=!SOLR_JETTY_CONFIG! --module=requestlog"
)
Expand Down
2 changes: 1 addition & 1 deletion solr/bin/solr.in.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ REM Location where Solr should write logs to. Absolute or relative to solr start
REM set SOLR_LOGS_DIR=logs

REM Enables jetty request log for all requests
REM set SOLR_REQUESTLOG_ENABLED=false
REM set SOLR_REQUESTLOG_ENABLED=true

REM Sets the port Solr binds to, default is 8983
REM set SOLR_PORT=8983
Expand Down
2 changes: 1 addition & 1 deletion solr/bin/solr.in.sh
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@
#SOLR_LOGS_DIR=logs

# Enables jetty request log for all requests
#SOLR_REQUESTLOG_ENABLED=false
#SOLR_REQUESTLOG_ENABLED=true

# Sets the port Solr binds to, default is 8983
#SOLR_PORT=8983
Expand Down
2 changes: 1 addition & 1 deletion solr/server/etc/jetty-requestlog.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<New class="org.eclipse.jetty.server.AsyncRequestLogWriter">
<Arg><Property name="solr.log.dir" default="logs"/>/yyyy_mm_dd.request.log</Arg>
<Set name="filenameDateFormat">yyyy_MM_dd</Set>
<Set name="retainDays">90</Set>
<Set name="retainDays"><Property name="solr.log.requestlog.retaindays" default="3"/></Set>
janhoy marked this conversation as resolved.
Show resolved Hide resolved
<Set name="append">true</Set>
<Set name="timeZone">UTC</Set>
</New>
Expand Down