> On 5. Apr 2018, at 23:24, gsimpson via Jenkins Developers > <[email protected]> wrote: > > I am going to go ahead and strongly disagree with the characterization that > changing the logging is easy. I may be the only one that has ever struggled > with getting custom logging for Jenkins but no one told the Jenkins Logging > Wiki it was easy either: > >> 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. > > Can you please please please share your secrets?
I'm not sure I understand the problem described in the wiki. I pieced together the following after a quick google search or two (i.e. these rules are probably mostly broken garbage): > $ cat Desktop/logging.properties > # Logging > handlers = java.util.logging.FileHandler > .level = ALL > > # File Logging > java.util.logging.FileHandler.pattern = %h/jenkins.log > java.util.logging.FileHandler.formatter = java.util.logging.SimpleFormatter > java.util.logging.FileHandler.level = ALL > > java.util.logging.SimpleFormatter.format='%1$tY-%1$tm-%1$td %1$tH:%1$tM:%1$tS > %4$s %2$s %5$s%6$s%n' > $ java > -Djava.util.logging.config.file=/Users/danielbeck/Desktop/logging.properties > -jar ~/Jenkins/wars/jenkins-2.107.1.war This works: It will create the file /Users/danielbeck/jenkins.log with extremely verbose content, in the custom one line format. I don't know what problems the wiki author encountered when they wrote this, but it seems wrong or obsolete. -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/E926E82C-9839-407E-B9A0-314C1ADF62B9%40beckweb.net. For more options, visit https://groups.google.com/d/optout.
