You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[JENKINS-8641] Add a logrotate definition to the Jenkins Debian package definition (similar to Apache, cron-apt, aptitude and apt) #15582
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.
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.
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.
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.
Works as I had hoped. I was a little surprised that it is retaining logs for a full year (rotate 52), but that probably better fits the needs of those who retain data for longer than I retain it.
Works as I had hoped. I was a little surprised that it is retaining logs for a full year (rotate 52), but that probably better fits the needs of those who retain data for longer than I retain it.
JENKINS-8641: Added a logrotate definition to the Debian/Ubuntu package.
Originally-From: jenkins-ci.org/commit/core/92aa65da2ebaeff58f4d33b8f0a067510043a20f
JENKINS-8641: Added a logrotate definition to the Debian/Ubuntu package.
Originally-From: jenkins-ci.org/commit/core/92aa65da2ebaeff58f4d33b8f0a067510043a20f
Usually logrotate needs to signal the process that it needs to use the new log file. I.e. close and reopen so that it's using the newly created log file created by `logrotate`. I don't see that here.
So how does Jenkins know to stop using the rotated log and use the/a new one?
Usually logrotate needs to signal the process that it needs to use the new log file. I.e. close and reopen so that it's using the newly created log file created by `logrotate`. I don't see that here.
So how does Jenkins know to stop using the rotated log and use the/a new one?
Activity
jenkins-infra-bot commentedon Feb 4, 2011
Raw content of original 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.
jenkins-infra-bot commentedon Feb 4, 2011
Raw content of original 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
}
jenkins-infra-bot commentedon Apr 26, 2011
Raw content of original comment:
Patch is in queue #106
jenkins-infra-bot commentedon May 10, 2011
Raw content of original 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-8641JENKINS-8641: Added a logrotate definition to the Debian/Ubuntu package.jenkins-infra-bot commentedon May 10, 2011
Raw content of original comment:
Code changed in jenkins
User: Kohsuke Kawaguchi
Path:
changelog.html
http://jenkins-ci.org/commit/jenkins/9e69d9a95b7197a39d34c0c5f9c23c64c589f5b5
Log:
recording
JENKINS-8641fixjenkins-infra-bot commentedon Jun 3, 2011
Raw content of original comment:
fixed in changelog but issue not closed ?
jenkins-infra-bot commentedon Jun 3, 2011
Raw content of original comment:
New file /etc/logrotate.d/jenkins appeared in the 1.413 build.
jenkins-infra-bot commentedon Jun 3, 2011
Raw content of original comment:
Works as I had hoped. I was a little surprised that it is retaining logs for a full year (rotate 52), but that probably better fits the needs of those who retain data for longer than I retain it.
jenkins-infra-bot commentedon Sep 12, 2011
Raw content of original comment:
Code changed in jenkins
User: René Moser
Path:
debian/debian/jenkins.logrotate
debian/debian/rules
http://jenkins-ci.org/commit/jenkins/8b09a585243287b6cb5270a0a1447995f1fc3dff
Log:
JENKINS-8641: Added a logrotate definition to the Debian/Ubuntu package.jenkins-infra-bot commentedon Sep 12, 2011
Raw content of original 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-8641JENKINS-8641: Added a logrotate definition to the Debian/Ubuntu package.jenkins-infra-bot commentedon Sep 12, 2011
Raw content of original comment:
Code changed in jenkins
User: Kohsuke Kawaguchi
Path:
changelog.html
http://jenkins-ci.org/commit/jenkins/9e69d9a95b7197a39d34c0c5f9c23c64c589f5b5
Log:
recording
JENKINS-8641fixjenkins-infra-bot commentedon Oct 20, 2011
Raw content of original comment:
Code changed in jenkins
User: René Moser
Path:
debian/debian/jenkins.logrotate
debian/debian/rules
http://jenkins-ci.org/commit/jenkins/8b09a585243287b6cb5270a0a1447995f1fc3dff
Log:
JENKINS-8641: Added a logrotate definition to the Debian/Ubuntu package.jenkins-infra-bot commentedon Oct 20, 2011
Raw content of original 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-8641JENKINS-8641: Added a logrotate definition to the Debian/Ubuntu package.jenkins-infra-bot commentedon Oct 20, 2011
Raw content of original comment:
Code changed in jenkins
User: Kohsuke Kawaguchi
Path:
changelog.html
http://jenkins-ci.org/commit/jenkins/9e69d9a95b7197a39d34c0c5f9c23c64c589f5b5
Log:
recording
JENKINS-8641fixjenkins-infra-bot commentedon Apr 3, 2015
Raw content of original comment:
Code changed in jenkins
User: René Moser
Path:
debian/jenkins.logrotate
debian/rules
http://jenkins-ci.org/commit/packaging/e4cc488c7222de80bb8505e016ee5caede4300e2
Log:
JENKINS-8641: Added a logrotate definition to the Debian/Ubuntu package.Originally-From: jenkins-ci.org/commit/core/8b09a585243287b6cb5270a0a1447995f1fc3dff
jenkins-infra-bot commentedon Apr 3, 2015
Raw content of original comment:
Code changed in jenkins
User: Kohsuke Kawaguchi
Path:
debian/jenkins.logrotate
debian/rules
http://jenkins-ci.org/commit/packaging/195bbb8c05e2ce1b96a4e3c1e45c1bc8077af4a8
Log:
Merge pull request #109 from resmo/
JENKINS-8641JENKINS-8641: Added a logrotate definition to the Debian/Ubuntu package.Originally-From: jenkins-ci.org/commit/core/92aa65da2ebaeff58f4d33b8f0a067510043a20f
jenkins-infra-bot commentedon May 21, 2024
brianjmurrell:
Raw content of original comment:
Usually logrotate needs to signal the process that it needs to use the new log file. I.e. close and reopen so that it's using the newly created log file created by `logrotate`. I don't see that here.
So how does Jenkins know to stop using the rotated log and use the/a new one?