Skip to content

Commit

Permalink
Merge pull request #105 from hashar/debian-jenkins_enable_access_log
Browse files Browse the repository at this point in the history
[JENKINS-18870] JENKINS_ENABLE_ACCESS_LOG for Debian
  • Loading branch information
svanoort committed Nov 29, 2017
2 parents e447477 + 0913729 commit 660ab1e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
4 changes: 4 additions & 0 deletions deb/build/debian/jenkins.default
Expand Up @@ -34,6 +34,10 @@ RUN_STANDALONE=true
JENKINS_LOG=/var/log/$NAME/$NAME.log
#JENKINS_LOG=daemon.info

# Whether to enable web access logging or not.
# Set to "yes" to enable logging to /var/log/$NAME/access_log
JENKINS_ENABLE_ACCESS_LOG="no"

# OS LIMITS SETUP
# comment this out to observe /etc/security/limits.conf
# this is on by default because http://github.com/jenkinsci/jenkins/commit/2fb288474e980d0e7ff9c4a3b768874835a3e92e
Expand Down
3 changes: 3 additions & 0 deletions deb/build/debian/jenkins.init
Expand Up @@ -31,6 +31,9 @@ JAVA_ALLOWED_VERSION="18"
if [ -n "$UMASK" ]; then
DAEMON_ARGS="$DAEMON_ARGS --umask=$UMASK"
fi
if [ "$JENKINS_ENABLE_ACCESS_LOG" = "yes" ]; then
DAEMON_ARGS="$DAEMON_ARGS --accessLoggerClassName=winstone.accesslog.SimpleAccessLogger --simpleAccessLogger.format=combined --simpleAccessLogger.file=/var/log/$NAME/access_log"
fi

SU=/bin/su

Expand Down
2 changes: 1 addition & 1 deletion deb/build/debian/jenkins.logrotate
@@ -1,4 +1,4 @@
/var/log/@@ARTIFACTNAME@@/@@ARTIFACTNAME@@.log {
/var/log/@@ARTIFACTNAME@@/@@ARTIFACTNAME@@.log /var/log/@@ARTIFACTNAME@@/access_log {
weekly
copytruncate
missingok
Expand Down

0 comments on commit 660ab1e

Please sign in to comment.