Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to enable debug logging on jenkins?

I am trying to debug how the ssh-slaves is behaving but the Jenkins documentation from https://wiki.jenkins-ci.org/display/JENKINS/Logging is extremely incomplete.

I added a new logger and added:

  • "hudson." with ALL
  • "org.jenkinsci.plugins." with ALL

Still the new log added is not updated at all.

Also, I found no information on how to enable logging for everything, empty, start or what?

Update: I tried to add -Djava.util.logging.loglevel=FINE to the command line starting Jenkins but to my surprise it did not had any effect on the JENKINS_LOG but it did had an effect on the log you can check on the GUI.

like image 701
sorin Avatar asked Jul 11 '13 09:07

sorin


People also ask

Can we debug in Jenkins?

Being able to debug a Jenkins plugins is a valuable addition to your development skills—it can help you understand what is going on with your own plugin while you are developing it, and it can also help you to resolve issues in other plugins or Jenkins itself.

Where can I see Jenkins logs?

I've taken a look in /var/log/jenkins/ as the documentation suggests, however the only file in that folder is a config file. Also, per the documentation, I have double checked the /etc/default/jenkins as well as the /etc/sysconfig/jenkins directories.

How do I monitor Jenkins logs?

If you want to want to monitor all the Jenkins instances, then you need to install filebeat in all the instances and ships the application log to logstash. Here, we will ship the application logs of one Jenkins instance only. Below is the filebeat. yml to monitor jenkins log file.

What is logger in Jenkins?

To view logs from a specific action exposed by Jenkins, or a plugin not typically monitored, you can add a logger under Manage Jenkins -> System Log -> Add new log recorder. To add a new logger you will be asked to provide it a name and choose a function to monitor. You'll also have the ability to change the verbosity.


1 Answers

I know this is a bit late and doesn't resolve your root prolem, but I found I could enable logging by not adding a '.' (dot) at the end of the logger name. So, add

  • 'hudson' with ALL
  • 'org.jenkinsci.plugins' with ALL
like image 125
Ritesh Tendulkar Avatar answered Sep 18 '22 13:09

Ritesh Tendulkar