From 0533d3bd173782c89493ceaab534ec4bb5741e97 Mon Sep 17 00:00:00 2001 From: Lachlan Roberts Date: Thu, 25 Feb 2021 21:43:49 +1100 Subject: [PATCH 1/2] Issue #6008 - Allow absolute paths to be provided in start.ini for request log directory. Signed-off-by: Lachlan Roberts --- .../src/main/config/etc/jetty-requestlog.xml | 14 +++++++++----- .../src/main/config/modules/requestlog.mod | 17 ++++++++++------- 2 files changed, 19 insertions(+), 12 deletions(-) diff --git a/jetty-server/src/main/config/etc/jetty-requestlog.xml b/jetty-server/src/main/config/etc/jetty-requestlog.xml index 3e87e5c0555c..e85c6f84ab88 100644 --- a/jetty-server/src/main/config/etc/jetty-requestlog.xml +++ b/jetty-server/src/main/config/etc/jetty-requestlog.xml @@ -15,11 +15,15 @@ - / - jetty.requestlog.filePath - /yyyy_mm_dd.request.log - - + + + + / + /yyyy_mm_dd.request.log + + + + diff --git a/jetty-server/src/main/config/modules/requestlog.mod b/jetty-server/src/main/config/modules/requestlog.mod index e4a660b3f3c4..59ece2270cba 100644 --- a/jetty-server/src/main/config/modules/requestlog.mod +++ b/jetty-server/src/main/config/modules/requestlog.mod @@ -17,23 +17,26 @@ etc/jetty-requestlog.xml logs/ [ini-template] -## Format string +## The CustomRequestLog format string (extended NCSA format by default). # jetty.requestlog.formatString=%a - %u %{dd/MMM/yyyy:HH:mm:ss ZZZ|GMT}t "%r" %s %B "%{Referer}i" "%{User-Agent}i" "%C" -## Logging directory (relative to $jetty.base) +## Logging Directory with Relative Path (relative to $jetty.base). # jetty.requestlog.dir=logs -## File path +## Relative File Path (relative to $jetty.base). # jetty.requestlog.filePath=${jetty.requestlog.dir}/yyyy_mm_dd.request.log -## Date format for rollovered files (uses SimpleDateFormat syntax) +## Absolute File Path (will override the relative file path). +# jetty.requestlog.absoluteFilePath=${jetty.base}/${jetty.requestlog.filePath} + +## Date format for rollovered files (uses SimpleDateFormat syntax). # jetty.requestlog.filenameDateFormat=yyyy_MM_dd -## How many days to retain old log files +## The number of days to retain old log files. # jetty.requestlog.retainDays=90 -## Whether to append to existing file +## Whether to append to existing file. # jetty.requestlog.append=false -## Timezone of the log file rollover +## Timezone of the log file rollover. # jetty.requestlog.timezone=GMT From 57f9865b84335ec40689eb9a3bc4a4d3e832e1bb Mon Sep 17 00:00:00 2001 From: Lachlan Roberts Date: Fri, 26 Feb 2021 00:02:29 +1100 Subject: [PATCH 2/2] Issue #6008 - Update to requestlog.mod with default ini params and extra comments. Signed-off-by: Lachlan Roberts --- jetty-server/src/main/config/modules/requestlog.mod | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/jetty-server/src/main/config/modules/requestlog.mod b/jetty-server/src/main/config/modules/requestlog.mod index 59ece2270cba..955abea371ce 100644 --- a/jetty-server/src/main/config/modules/requestlog.mod +++ b/jetty-server/src/main/config/modules/requestlog.mod @@ -16,6 +16,10 @@ etc/jetty-requestlog.xml [files] logs/ +[ini] +jetty.requestlog.dir?=logs +jetty.requestlog.filePath?=${jetty.requestlog.dir}/yyyy_mm_dd.request.log + [ini-template] ## The CustomRequestLog format string (extended NCSA format by default). # jetty.requestlog.formatString=%a - %u %{dd/MMM/yyyy:HH:mm:ss ZZZ|GMT}t "%r" %s %B "%{Referer}i" "%{User-Agent}i" "%C" @@ -24,9 +28,11 @@ logs/ # jetty.requestlog.dir=logs ## Relative File Path (relative to $jetty.base). +## The string 'yyyy_mm_dd' in the filename will be replaced with the date format specified with ${jetty.requestlog.filenameDateFormat}. # jetty.requestlog.filePath=${jetty.requestlog.dir}/yyyy_mm_dd.request.log ## Absolute File Path (will override the relative file path). +## The string 'yyyy_mm_dd' in the filename will be replaced with the date format specified with ${jetty.requestlog.filenameDateFormat}. # jetty.requestlog.absoluteFilePath=${jetty.base}/${jetty.requestlog.filePath} ## Date format for rollovered files (uses SimpleDateFormat syntax).