Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-8641

Add a logrotate definition to the Jenkins Debian package definition (similar to Apache, cron-apt, aptitude and apt)

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Trivial Trivial
    • core
    • None
    • Debian Linux i386 and AMD64

      The Debian package is a great convenience for me. It configures a user, registers the daemon, and makes installation and upgrade wonderful on Debian. I was surprised when I discovered /var/log/jenkins/jenkins.log with over 2 GB of log information on my machine.

      Other Debian packages seem to have some ability to configure their logrotate settings automatically (like Apache, apt, ppp, etc.). It would be nice if Jenkins could do the same.

          [JENKINS-8641] Add a logrotate definition to the Jenkins Debian package definition (similar to Apache, cron-apt, aptitude and apt)

          MarkEWaite created issue -

          We use daemon(1) to turn Jenkins into a daemon, but it doesn't appear to support log reopening via signal. So unfortunately this is bit tricky to get right.

          I guess we should let Jenkins directly write to a log file with --logfile, since Jenkins supports log reopening via SIGALRM. Doing this requires we capture PID of the Java process, not just the daemon process.

          Kohsuke Kawaguchi added a comment - We use daemon(1) to turn Jenkins into a daemon, but it doesn't appear to support log reopening via signal. So unfortunately this is bit tricky to get right. I guess we should let Jenkins directly write to a log file with --logfile, since Jenkins supports log reopening via SIGALRM. Doing this requires we capture PID of the Java process, not just the daemon process.

          Mark Waite added a comment -

          I thought you could avoid the hassle of closing and reopening the log by using the copytruncate setting.

          I use this configuration:

          /var/log/jenkins/jenkins.log
          {
          daily
          copytruncate
          missingok
          compress
          delaycompress
          notifempty
          rotate 8
          }

          Mark Waite added a comment - I thought you could avoid the hassle of closing and reopening the log by using the copytruncate setting. I use this configuration: /var/log/jenkins/jenkins.log { daily copytruncate missingok compress delaycompress notifempty rotate 8 }
          René Moser made changes -
          Assignee New: René Moser [ resmo ]
          Mark Waite made changes -
          Description Original: The Debian package is a great convenience for me. It configures a user, registers the daemon, and makes installation and upgrade wonderful on Debian. I was surprised when I discovered /var/log/hudson/hudson.log with over 2 GB of log information on my machine.

          Other Debian packages seem to have some ability to configure their logrotate settings automatically (like Apache, apt, ppp, etc.). It would be nice if Hudson could do the same.
          New: The Debian package is a great convenience for me. It configures a user, registers the daemon, and makes installation and upgrade wonderful on Debian. I was surprised when I discovered /var/log/hudson/hudson.log with over 2 GB of log information on my machine.

          Other Debian packages seem to have some ability to configure their logrotate settings automatically (like Apache, apt, ppp, etc.). It would be nice if Jenkins could do the same.
          Summary Original: Add a logrotate definition to the Hudson Debian package definition (similar to Apache, cron-apt, aptitude and apt) New: Add a logrotate definition to the Jenkins Debian package definition (similar to Apache, cron-apt, aptitude and apt)
          Mark Waite made changes -
          Description Original: The Debian package is a great convenience for me. It configures a user, registers the daemon, and makes installation and upgrade wonderful on Debian. I was surprised when I discovered /var/log/hudson/hudson.log with over 2 GB of log information on my machine.

          Other Debian packages seem to have some ability to configure their logrotate settings automatically (like Apache, apt, ppp, etc.). It would be nice if Jenkins could do the same.
          New: The Debian package is a great convenience for me. It configures a user, registers the daemon, and makes installation and upgrade wonderful on Debian. I was surprised when I discovered /var/log/jenkins/jenkins.log with over 2 GB of log information on my machine.

          Other Debian packages seem to have some ability to configure their logrotate settings automatically (like Apache, apt, ppp, etc.). It would be nice if Jenkins could do the same.

          René Moser added a comment -

          René Moser added a comment - Patch is in queue https://github.com/jenkinsci/jenkins/pull/106

          Code changed in jenkins
          User: Kohsuke Kawaguchi
          Path:
          debian/debian/jenkins.logrotate
          debian/debian/rules
          http://jenkins-ci.org/commit/jenkins/92aa65da2ebaeff58f4d33b8f0a067510043a20f
          Log:
          Merge pull request #109 from resmo/JENKINS-8641

          JENKINS-8641: Added a logrotate definition to the Debian/Ubuntu package.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Kohsuke Kawaguchi Path: debian/debian/jenkins.logrotate debian/debian/rules http://jenkins-ci.org/commit/jenkins/92aa65da2ebaeff58f4d33b8f0a067510043a20f Log: Merge pull request #109 from resmo/ JENKINS-8641 JENKINS-8641 : Added a logrotate definition to the Debian/Ubuntu package.

          Code changed in jenkins
          User: Kohsuke Kawaguchi
          Path:
          changelog.html
          http://jenkins-ci.org/commit/jenkins/9e69d9a95b7197a39d34c0c5f9c23c64c589f5b5
          Log:
          recording JENKINS-8641 fix

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Kohsuke Kawaguchi Path: changelog.html http://jenkins-ci.org/commit/jenkins/9e69d9a95b7197a39d34c0c5f9c23c64c589f5b5 Log: recording JENKINS-8641 fix

          fixed in changelog but issue not closed ?

          Arnaud Héritier added a comment - fixed in changelog but issue not closed ?

            resmo René Moser
            MarkEWaite MarkEWaite
            Votes:
            4 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: