For log rotation you have a few options

Option 1
Use logrotoate.

[foo@host ~]# cat /etc/logrotate.d/jenkins
/opt/jenkins/logs/jenkins.log /opt/jenkins/logs/access_log {
    compress
    dateext
    maxage 365
    rotate 99
    size=+4096k
    notifempty
    missingok
    create 644
    postrotate
        if [ -s /var/run/jenkins.pid ]; then
            JPID=`cat /var/run/jenkins.pid`
            test -n "`find /proc/$JPID -maxdepth 0 -user jenkins 2>/dev/null`" 
&& kill -s ALRM $JPID || :
        fi
    endscript
}

Option 2
onfigure java logging (pass 
-Djava.util.logging.config.file=/opt/jenkins/logging.properties to the JVM) and 
specify the configurationtion and implementation to do rollover/deletion.


For your second question – confluence has markedup the double dash -- as a 
strikethrough command (and it should be makred as nomarkup in the wiki).

/James

From: [email protected] 
[mailto:[email protected]] On Behalf Of hanasaki-jenkins
Sent: 26 February 2014 08:13
To: [email protected]
Subject: Howto : Jenkins executable WAR and rotating log files

Q: How can the Jenkins self executable be configured to rotate log files 
automatically?
It is running from a linux bash script with the "-logfile=" option as in the 
below referenced link.

Q: Why is the line half covered in a "strike through"? (below referenced link)

reference: 
https://wiki.jenkins-ci.org/display/JENKINS/Starting+and+Accessing+Jenkins
--
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to 
[email protected]<mailto:[email protected]>.
For more options, visit https://groups.google.com/groups/opt_out.

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to