Due to some maintenance issues, this service has been switched in read-only mode, you can find more information about the why

and how to migrate your plugin documentation in this blogpost

Skip to end of metadata
Go to start of metadata

Logs on the system

When running jenkins.war manually with java -jar jenkins.war, all logging information by default is output to standard out. Many Jenkins native packages modify this behavior to ensure logging information is output in a more conventional location for the platform.


By default logs should be made available in /var/log/jenkins/jenkins.log, unless customized in /etc/default/jenkins (for *.deb) or via /etc/sysconfig/jenkins (for */rpm)


By default logs should be at %JENKINS_HOME%/jenkins.out and %JENKINS_HOME%/jenkins.err, unless customized in %JENKINS_HOME%/jenkins.xml

Mac OS X

Log files should be at /var/log/jenkins/jenkins.log, unless customized in org.jenkins-ci.plist


If you run Jenkins inside docker as a detached container, you can use docker logs containerId to collect jenkins log

Logs in Jenkins

Jenkins uses java.util.logging for logging. The j.u.l system by default sends every log above INFO to stdout, but unfortunately, most servlet containers alter this behavior, making it difficult for us to tell you exactly where you should look at. Also, they tend to bundle all the logs from the entire JVM into a single place, making it difficult to follow a particular aspect of the system.

Because of these reasons, Jenkins is equipped with a GUI for configuring/collecting/reporting log records of your choosing. This page shows you how to do this.

First, select the "system log" from the "Manage Jenkins" page:

From there, you can create a custom log recorder, which helps you group relevant logs together while filtering out the noise.

Choose a name that makes sense to you.

You'll be then asked to configure loggers and their levels whose output you'd like to collect. Depending on which part of Jenkins you monitor, you'll need to specify different loggers. Tell us the symptom of your problem in the users list and we should be able to tell you where you need to look at. Also, this is really just a wrapper around the java.util.logging package, so if you program in Java, you might be able to guess what to look at.

Once the set up is complete, Jenkins will start collecting data. The collected logs are available from the web UI.

Making logs available outside of the web UI

Some people have a need to send log messages to files or a central log server. Another problem with making logs available only in the web UI can arise in case login to Jenkins is broken and therefore you cannot access the log view page which would show you the exceptions that would help you to find out why you cannot login successfully.

Unfortunately, there is no simple way in Jenkins to send log messages generated by Jenkins himself or by any plugins to the console, to a file or anywhere else. No matter what command line options you will use, you just won't succeed. It won't even help if you inject a java.util.logging configuration file directly into the JVM as Jenkins will override any settings in there programmatically.

Technically speaking, Jenkins instantiates a logger called hudson.WebAppMain in the the WebAppMain class and attaches one and only one handler to it: A hudson.util.RingBufferLogHandler. That handler just collects log records in memory and makes them accessible to the log view view in the web UI. All of Jenkins and its plugins inherit from the hudson.WebAppMain logger, which is why nothing being logged there (not even exceptions) ever make it to the console or any log files by default. And as you browse the source code, you'll learn there are absolutely no hooks available at all to allow log output to go anywhere else.

One solution is to use a little known mechanism available in Jenkins: Groovy Hook Script. One can write a piece of Groovy code which will be executed by Jenkins as an init script, i.e. every time Jenkins starts; right when it will be fully initialized and ready to start work. As that Groovy script will execute in the same JVM as Jenkins himself, one can access and manipulate all objects in that VM. So just four lines of Groovy code will be enough to add another handler to the hudson.WebAppMain logger to receive a copy of any log entries generated inside Jenkins and direct them where every you want them to show up.

For example, put the following Groovy script into a file called.jenkins/init.groovy.d/extralogging.groovy

import java.util.logging.ConsoleHandler
import java.util.logging.FileHandler
import java.util.logging.SimpleFormatter
import java.util.logging.LogManager
import jenkins.model.Jenkins

// Log into the console
def WebAppMainLogger = LogManager.getLogManager().getLogger("hudson.WebAppMain")
WebAppMainLogger.addHandler (new ConsoleHandler())

// Log into a file
def RunLogger = LogManager.getLogManager().getLogger("hudson.model.Run")
def logsDir = new File(Jenkins.instance.rootDir, "logs")
FileHandler handler = new FileHandler(logsDir.absolutePath+"/hudson.model.Run-%g.log", 1024 * 1024, 10, true);
handler.setFormatter(new SimpleFormatter());

This will just copy all log records generated by Jenkins and any plugins to the console and all logs from hudson.model.Run into a file. They will still be available in the log view in the web UI.

Of course, you can edit the Groovy script to add other or more handlers, set their levels, etc. Just refer to the java.util.logging documentation.

A much simpler solution (though with no configurability) is to install the Support Core Plugin, which causes custom logs to be written to disk automatically.

Debug logging in Jenkins

Create a file logging.properties in which you define the logging levels and a ConsoleHandler Then pass this file to the JVM by adding the system property -Djava.util.logging.config.file=<pathTo>/logging.properties. In the logging.properties file please add the below line:



  • No labels


  1. Unknown User (t.guieu)

    I don't really know where to tell this, but as it's this page that shows it, I'll post there.

    This new way of putting things under the lights (the red rectangles) is really easy to follow, we can instantly see where to change things. Please continue with this.

    1. Unknown User (kohsuke)

      Thanks! We'll keep doing that.

  2. Unknown User (alookachaloo)

    I am not sure why , but the Logs that I get when my build fails are different (more detailed), rather than the logs I can see on the output console in Hudson ,How can I see full logs on output console?

    I tried using logger utility to see more logs for Sonar , but it seems its not working out , can you tell me how should I configure logger to get more logs on Sonar ?

    I want to add an environment variable to Hudson that I can set using a shell script , how can I do that ?

  3. Unknown User (karl.baum@gmail.com)

    Viewing logs through the web is not always ideal.  Can these logs also be written to the filesystem?

  4. Unknown User (fpbremen)

    In version 1.351 the help mark beside the 'Log Recorders' text goes to a not (any more) existing link.

  5. Unknown User (xdelas)

    Need to update this page to remove hudson references.




    1. Unknown User (markhu)

      That would be nice, but many plugins still use the old reference, for instance hudson.plugins.disk_usage as in the screenshot above.

  6. Unknown User (artdias90)

    My UI is logging in INFO level as expected.

    But in  my catalina.out log file ( from Hudson server) I get all INFO log messages, PLUS loads of unnecessary messages like: 


    'name   <host_name>.'

    'name <another_hostname>'



    Is it Hudson logging ? 

  7. Unknown User (jglick)

    Not explained here:

    • interaction with "Log Levels" / "Logger Configuration" page (/log/levels)
    • how inheritance works in the context of this GUI - does it work? does the order of loggers in a recorder matter?
  8. Unknown User (ssbarnea)

    Can anyone explain what namespaces are available and how to enable logging for all of them? So far my new logger is always empty even if I put ALL and:L"hudson." "org.jenkinsci.plugins."

      1. Unknown User (ssbarnea)

        Thank toy Jesse. Still, all of these are marked as fixed, so I gues there are other problems. Also I discovered that if I change the logging level using -Djava.util.logging=DEBUG it will increase the log level on Jenkins web console but not on the JENKINS_LOG... quite unexpected. Using this I was able to fix my problem but the logging is still an issue.

        1. Unknown User (jglick)

          Fixed in some version of Jenkins, not necessarily yours unless you are running a dev build.

          This is not the best place to have a discussion; use the developers’ list.

  9. Unknown User (zacharysyoung)


    What is the logger name for the Subversion plugin, please?

    Thank you,


  10. Unknown User (joespr)

    Is it possible? I think (I hope) I found a _partial_ way around the restriction mentioned above...

    >>Unfortunately, there is no simple way in Jenkins to send log messages generated by Jenkins himself or by any plugins to the console, to a file or anywhere else. No matter what command line options you will use, you just won't succeed.<<

    In this case, I am invoking the build process (on Configure page) with Windows batch command (although this _could_ work with other methods)... After the last batch command I added the following command:

    type %WORKSPACE%\..\builds\%BUILD_NUMBER%\log > myoutput.txt

    which gets the contents of the current build's log file and outputs it to another file (in the Workspace).Of course in real life, it would more sophisticated than a simple file named 'myoutput.txt'

  11. Unknown User (solstice333)

    Is there a way to disable (or at least limit) stderr/stdout logging? I have a case where the tomcat stderr log got bloated to 22 GB as a result from Jenkins.

  12. Unknown User (dotnetmobile)


    I successfully installed the jenkins docker on my Mac OS system. Unfortunately I couldn't find the jenkins.log file as specified.

    Even I executed find / -name 'jenkins.log' and it didn't find it.

    May I, please, ask you how to locate it? Thanks

  13. Unknown User (yidmoussi)

    Hi, thanks for the very informative article first. but I need to know is it safe to delete the "jenkins.log" file if it gets very huge!! this happens a lot to me. there is no configuration in it or anything that will be lost I guess. Thanks in advance.

  14. Unknown User (sharadholani)

    How can I push all our build logs after every build to S3?I tried S3 plugin but that pushes only artifactory and not build log.s

  15. Unknown User (xurko)

    Is it possible to set logger only for a specific plugin? I have a problem with Slack plugin not posting properly when running Newman tests... 

  16. Unknown User (jvz)

    It may be helpful to note that in unit tests, you can use the LoggerRule class to enable and capture logging.

    1. Unknown User (jglick)

      This page is pretty old and crufty. Better to contribute to an official docs page on jenkins.io.