Logging

Hudson 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, Hudson 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 Hudson" 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 Hudson 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, Hudson will start collecting data. The collected logs are available from the web UI.

Labels:

Enter labels to add to this page:
Wait Image 
Looking for a label? Just start typing.
  1. Apr 03, 2009

    Thomas Guieu says:

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

    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. May 26, 2009

      Kohsuke Kawaguchi says:

      Thanks! We'll keep doing that.

      Thanks! We'll keep doing that.

  2. Jun 16, 2009

    Ankit Mittal says:

    I am not sure why , but the Logs that I get when my build fails are different (m...

    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. Sep 17, 2009

    Karl Baum says:

    Viewing logs through the web is not always ideal.  Can these logs also be w...

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

    1. Feb 12, 2011

      Sorin Sbarnea says:

      Yep, I was looking for the same feature.

      Yep, I was looking for the same feature.

  4. Mar 19, 2010

    Felix Petriconi says:

    In version 1.351 the help mark beside the 'Log Recorders' text goes to a not (an...

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

  5. Sep 19, 2011

    techno.geeks says:

    I am investigating on subversion polling. To get more details for investigating,...

    I am investigating on subversion polling. To get more details for investigating, I want to enable system log for subversion polling. Pls let me know logger name for subversion polling. Problem is - After the subversion checkin, my Jenkins build is doing auto kick off and does not show much in subversion polling.

    1. Sep 21, 2011

      Susan Duncan says:

      Hi can I suggest that you email the user list with this question. It will put yo...

      Hi can I suggest that you email the user list with this question. It will put you in touch with more users, more quickly ;-:

      users@hudson.java.net

  6. Oct 31, 2011

    Karunagara Pandi says:

    Hi,             How to e...

    Hi,

                How to enable change log history between builds?

               I have installed the latest plugin only though, it is not generating the change log history report when I click on the 'Changes' option from the left side pane.

               Instead, it shows like

                           "Unable to accurately compare changes against previous build. Full checkout performed." --- Unknown / detail

               I don't know what could be the reason. can anyone please resolve my issue? If I'm wrong in this forum please tell me where should I post this?

    Thanks