[JIRA] (JENKINS-57888) Custom log format broken by 2.177

0 views
Skip to first unread message

fatmcgav@gmail.com (JIRA)

unread,
Jun 6, 2019, 11:24:02 AM6/6/19
to jenkinsc...@googlegroups.com
Gavin Williams created an issue
 
Jenkins / Bug JENKINS-57888
Custom log format broken by 2.177
Issue Type: Bug Bug
Assignee: Unassigned
Components: core
Created: 2019-06-06 15:23
Priority: Major Major
Reporter: Gavin Williams

Upon upgrading from 2.176 to 2.177, it would appear that support for providing a custom log format has been broken, I suspect by the upgrade of Jetty. 

Logging.properties file:

.level=ALL
handlers=java.util.logging.ConsoleHandler

java.util.logging.SimpleFormatter.format=[%1$tF %1$tT.%1$tL][%4$s][%2$s] %5$s %6$s%n 
java.util.logging.ConsoleHandler.level=INFO java.util.logging.ConsoleHandler.formatter=java.util.logging.SimpleFormatter

I've also added the following JVM argument:

-Djava.util.logging.config.file=/var/lib/jenkins/logging.properties

 

Log format with 2.176:

[2019-06-06 15:10:07.881][INFO][jenkins.InitReactorRunner$1 onAttained] Completed initialization
[2019-06-06 15:10:08.052][INFO][hudson.WebAppMain$3 run] Jenkins is fully up and running

 

Log format with 2.177:

2019-06-06 15:11:40.956+0000 [id=29] INFO jenkins.InitReactorRunner$1#onAttained: Completed initialization 
2019-06-06 15:11:41.136+0000 [id=20] INFO hudson.WebAppMain$3#run: Jenkins is fully up and running
Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

fatmcgav@gmail.com (JIRA)

unread,
Jun 6, 2019, 11:29:02 AM6/6/19
to jenkinsc...@googlegroups.com
Gavin Williams updated an issue
Change By: Gavin Williams
Upon upgrading from 2.176 to 2.177, it would appear that support for providing a custom log format has been broken, I suspect by due to what looks like an undocumented [change|[https://github.com/jenkinsci/winstone/pull/63]] in the upgrade of Jetty Winstone library

Logging.properties file:
{code:java}

.level=ALL
handlers=java.util.logging.ConsoleHandler

java.util.logging.SimpleFormatter.format=[%1$tF %1$tT.%1$tL][%4$s][%2$s] %5$s %6$s%n
java.util.logging.ConsoleHandler.level=INFO java.util.logging.ConsoleHandler.formatter=java.util.logging.SimpleFormatter{code}

I've also added the following JVM argument:
{code:java}
-Djava.util.logging.config.file=/var/lib/jenkins/logging.properties
{code}
 

Log format with 2.176:
{noformat}

[2019-06-06 15:10:07.881][INFO][jenkins.InitReactorRunner$1 onAttained] Completed initialization
[2019-06-06 15:10:08.052][INFO][hudson.WebAppMain$3 run] Jenkins is fully up and running
{noformat}
 

Log format with 2.177:
{noformat}

2019-06-06 15:11:40.956+0000 [id=29] INFO jenkins.InitReactorRunner$1#onAttained: Completed initialization
2019-06-06 15:11:41.136+0000 [id=20] INFO hudson.WebAppMain$3#run: Jenkins is fully up and running
{noformat}

fatmcgav@gmail.com (JIRA)

unread,
Jun 6, 2019, 11:30:02 AM6/6/19
to jenkinsc...@googlegroups.com
Gavin Williams updated an issue
Upon upgrading from 2.176 to 2.177, it would appear that support for providing a custom log format has been broken, due to what looks like an undocumented [ change | ( [https://github.com/jenkinsci/winstone/pull/63] ] ) in the Winstone library. 


Logging.properties file:
{code:java}
.level=ALL
handlers=java.util.logging.ConsoleHandler

java.util.logging.SimpleFormatter.format=[%1$tF %1$tT.%1$tL][%4$s][%2$s] %5$s %6$s%n
java.util.logging.ConsoleHandler.level=INFO java.util.logging.ConsoleHandler.formatter=java.util.logging.SimpleFormatter{code}
I've also added the following JVM argument:
{code:java}
-Djava.util.logging.config.file=/var/lib/jenkins/logging.properties
{code}
 

Log format with 2.176:
{noformat}
[2019-06-06 15:10:07.881][INFO][jenkins.InitReactorRunner$1 onAttained] Completed initialization
[2019-06-06 15:10:08.052][INFO][hudson.WebAppMain$3 run] Jenkins is fully up and running
{noformat}
 

Log format with 2.177:
{noformat}
2019-06-06 15:11:40.956+0000 [id=29] INFO jenkins.InitReactorRunner$1#onAttained: Completed initialization
2019-06-06 15:11:41.136+0000 [id=20] INFO hudson.WebAppMain$3#run: Jenkins is fully up and running
{noformat}

dbeck@cloudbees.com (JIRA)

unread,
Jun 7, 2019, 10:58:02 AM6/7/19
to jenkinsc...@googlegroups.com
Daniel Beck updated an issue
Change By: Daniel Beck
Labels: regression

dbeck@cloudbees.com (JIRA)

unread,
Jun 7, 2019, 10:58:02 AM6/7/19
to jenkinsc...@googlegroups.com
Daniel Beck updated an issue
Change By: Daniel Beck
Component/s: winstone-jetty

louis.remi@gmail.com (JIRA)

unread,
Jan 15, 2020, 1:29:08 PM1/15/20
to jenkinsc...@googlegroups.com
Louis-Rémi Paquet commented on Bug JENKINS-57888
 
Re: Custom log format broken by 2.177

Is there a workaround to be able to provide a ConsoleHandler formatter?

If not, I'll be submitting a PR removing the overriding of it.

It will still be possible to set the formatter from the command line or the logging.properties as usual.

What do you think?

This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

jglick@cloudbees.com (JIRA)

unread,
Jan 15, 2020, 1:35:08 PM1/15/20
to jenkinsc...@googlegroups.com

The new formatter is deliberate. There could be a Winstone option to select an alternate formatter if someone cares to write it, or perhaps just by disabling the new formatter when java.util.logging.config.file is defined.

louis.remi@gmail.com (JIRA)

unread,
Jan 16, 2020, 9:09:10 AM1/16/20
to jenkinsc...@googlegroups.com

Yes, that would be possible.

I'm wondering, though, why the standard java behavior is overridden. It's not something one would expect.

louis.remi@gmail.com (JIRA)

unread,
Jan 16, 2020, 11:20:07 AM1/16/20
to jenkinsc...@googlegroups.com

jglick@cloudbees.com (JIRA)

unread,
Jan 16, 2020, 11:50:11 AM1/16/20
to jenkinsc...@googlegroups.com
Jesse Glick started work on Bug JENKINS-57888
 
Change By: Jesse Glick
Status: Open In Progress

jglick@cloudbees.com (JIRA)

unread,
Jan 16, 2020, 11:50:20 AM1/16/20
to jenkinsc...@googlegroups.com

o.v.nenashev@gmail.com (JIRA)

unread,
Jan 24, 2020, 4:17:03 AM1/24/20
to jenkinsc...@googlegroups.com

o.v.nenashev@gmail.com (JIRA)

unread,
Jan 24, 2020, 4:18:03 AM1/24/20
to jenkinsc...@googlegroups.com

o.v.nenashev@gmail.com (JIRA)

unread,
Jan 24, 2020, 5:48:03 AM1/24/20
to jenkinsc...@googlegroups.com

o.v.nenashev@gmail.com (JIRA)

unread,
Jan 27, 2020, 5:44:03 PM1/27/20
to jenkinsc...@googlegroups.com
Oleg Nenashev updated Bug JENKINS-57888
 

It was released in 2.218, thanks to Louis-Rémi Paquet! I will mark it as LTS candidate, but it would require Winstone backporting due to the JENKINS-60857 regressions in 5.6. If Oliver Gondža decides it is important enough, I will do such backporting. 

Change By: Oleg Nenashev
Status: In Review Resolved
Resolution: Fixed
Released As: Jenkins 2.218

o.v.nenashev@gmail.com (JIRA)

unread,
Jan 27, 2020, 5:44:04 PM1/27/20
to jenkinsc...@googlegroups.com
Oleg Nenashev updated an issue
Change By: Oleg Nenashev
Labels: lts-candidate regression

ogondza@gmail.com (JIRA)

unread,
Feb 13, 2020, 3:56:05 PM2/13/20
to jenkinsc...@googlegroups.com
Oliver Gondža updated an issue
Change By: Oliver Gondža
Labels: lts 2.204.3 - candidate fixed regression

ogondza@gmail.com (JIRA)

unread,
Mar 6, 2020, 9:43:02 AM3/6/20
to jenkinsc...@googlegroups.com
Oliver Gondža updated an issue
Change By: Oliver Gondža
Labels: 2.204.3-fixed 2.204.5-rejected lts-candidate regression
This message was sent by Atlassian Jira (v7.13.12#713012-sha1:6e07c38)
Atlassian logo

ogondza@gmail.com (JIRA)

unread,
Mar 6, 2020, 9:44:03 AM3/6/20
to jenkinsc...@googlegroups.com
Oliver Gondža commented on Bug JENKINS-57888
 
Re: Custom log format broken by 2.177

This will be reverted in 2.204.5 as it has caused regressions much more impactfull.

jglick@cloudbees.com (JIRA)

unread,
Mar 6, 2020, 10:18:03 AM3/6/20
to jenkinsc...@googlegroups.com

To be clear, it was not this fix which caused the regressions, but unrelated changes in winstone.

ogondza@gmail.com (JIRA)

unread,
Mar 10, 2020, 9:58:02 AM3/10/20
to jenkinsc...@googlegroups.com
Oliver Gondža updated an issue
Change By: Oliver Gondža
Labels: 2.204.3-fixed 2.204.5-rejected lts 2.222.1 - candidate fixed regression

o.v.nenashev@gmail.com (JIRA)

unread,
Mar 18, 2020, 6:36:02 AM3/18/20
to jenkinsc...@googlegroups.com
Oleg Nenashev updated an issue
Change By: Oleg Nenashev
Labels: 2.204.3-fixed 2.204.5-rejected 2.222.1-fixed non-trivial-lts-backporting regression
Reply all
Reply to author
Forward
0 new messages