How to configure Loggers for Jenkins Agents

Article ID:360057406531
1 minute readKnowledge base


  • I want to adjust the log levels for Agents for specific packages / classes


Since Remoting 3.8, Agent logging can be customized via property file (e.g. and its default behavior depends on the Work Directory mode (Before this release you have to use the -agentLog option or to redirect STDOUT/STDERR streams.)


1/ In the Remoting Working Directory locate a file called with the following content.

# .level = ALL handlers= java.util.logging.FileHandler java.util.logging.FileHandler.level=ALL java.util.logging.FileHandler.formatter=java.util.logging.SimpleFormatter java.util.logging.FileHandler.pattern=support/jenkins-ssh-agent-%u.log java.util.logging.FileHandler.limit=10000000 java.util.logging.FileHandler.count=10 javax.jms.connection.level=INFO hudson.level=INFO hudson.remoting.Channel.level=FINE hudson.remoting.FileSystemJarCache.level=INFO hudson.remoting.jnlp.level=FINE hudson.remoting.RemoteClassLoader.level=INFO jenkins.slaves.level=FINE hudson.slaves.level=FINE org.jenkinsci.remoting.engine.level=FINE jenkins.AgentProtocol.level=FINE

2/ Include -Djava.util.logging.config.file=<path to> to Java Parameters options of the agent (Note the path from the Working Directory). Alternatively, it can be configured via adding -loggingConfig=<path to> to the start up commands.

3/ Logs files will be available from ${workDir}/support