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

瀏覽次數:0 次
跳到第一則未讀訊息

fatmcgav@gmail.com (JIRA)

未讀,
2019年6月6日 上午11:24:022019/6/6
收件者: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)

未讀,
2019年6月6日 上午11:29:022019/6/6
收件者: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)

未讀,
2019年6月6日 上午11:30:022019/6/6
收件者: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)

未讀,
2019年6月7日 上午10:58:022019/6/7
收件者:jenkinsc...@googlegroups.com
Daniel Beck updated an issue
Change By: Daniel Beck
Labels: regression

dbeck@cloudbees.com (JIRA)

未讀,
2019年6月7日 上午10:58:022019/6/7
收件者:jenkinsc...@googlegroups.com
Daniel Beck updated an issue
Change By: Daniel Beck
Component/s: winstone-jetty

louis.remi@gmail.com (JIRA)

未讀,
2020年1月15日 下午1:29:082020/1/15
收件者: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)

未讀,
2020年1月15日 下午1:35:082020/1/15
收件者: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)

未讀,
2020年1月16日 上午9:09:102020/1/16
收件者: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)

未讀,
2020年1月16日 上午11:20:072020/1/16
收件者:jenkinsc...@googlegroups.com

jglick@cloudbees.com (JIRA)

未讀,
2020年1月16日 上午11:50:112020/1/16
收件者:jenkinsc...@googlegroups.com
Jesse Glick started work on Bug JENKINS-57888
 
Change By: Jesse Glick
Status: Open In Progress

jglick@cloudbees.com (JIRA)

未讀,
2020年1月16日 上午11:50:202020/1/16
收件者:jenkinsc...@googlegroups.com

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

未讀,
2020年1月24日 凌晨4:17:032020/1/24
收件者:jenkinsc...@googlegroups.com

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

未讀,
2020年1月24日 凌晨4:18:032020/1/24
收件者:jenkinsc...@googlegroups.com

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

未讀,
2020年1月24日 清晨5:48:032020/1/24
收件者:jenkinsc...@googlegroups.com

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

未讀,
2020年1月27日 下午5:44:032020/1/27
收件者: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)

未讀,
2020年1月27日 下午5:44:042020/1/27
收件者:jenkinsc...@googlegroups.com
Oleg Nenashev updated an issue
Change By: Oleg Nenashev
Labels: lts-candidate regression

ogondza@gmail.com (JIRA)

未讀,
2020年2月13日 下午3:56:052020/2/13
收件者: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)

未讀,
2020年3月6日 上午9:43:022020/3/6
收件者: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)

未讀,
2020年3月6日 上午9:44:032020/3/6
收件者: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)

未讀,
2020年3月6日 上午10:18:032020/3/6
收件者:jenkinsc...@googlegroups.com

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

ogondza@gmail.com (JIRA)

未讀,
2020年3月10日 上午9:58:022020/3/10
收件者: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)

未讀,
2020年3月18日 清晨6:36:022020/3/18
收件者: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
回覆所有人
回覆作者
轉寄
0 則新訊息