Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upgrade logback from 1.0.7 to 1.3.14 and slf4j to 2.0.12 #632

Merged
merged 6 commits into from
Mar 10, 2024

Conversation

baulea
Copy link
Contributor

@baulea baulea commented Mar 1, 2024

upgrade logback from 1.0.7 to 1.3.14

PR Branch
https://github.com/baulea/zerocode/tree/upgrade_logback

Motivation and Context

Checklist:

  • Unit tests added

  • Integration tests added

  • Test names are meaningful

  • Feature manually tested

  • Branch build passed

  • No 'package.*' in the imports

  • Relevant Wiki page updated with clear instruction for the end user

    • Not applicable. This was only a refactor change, no functional or behaviour changes were introduced
  • Http test added to http-testing module(if applicable) ?

    • Not applicable. The changes did not affect HTTP automation flow
  • Kafka test added to kafka-testing module(if applicable) ?

    • Not applicable. The changes did not affect Kafka automation flow

@a1shadows
Copy link
Collaborator

Capturing the diff in logback logs from another CI build and this one:

Older builds:

[INFO]  T E S T S
[INFO] -------------------------------------------------------
[INFO] Running org.jsmart.zerocode.filebody.ReuseFileBodyTest
16:24:45,707 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback.groovy]
16:24:45,707 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback-test.xml]
16:24:45,708 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found resource [logback.xml] at [file:/home/runner/work/zerocode/zerocode/core/target/classes/logback.xml]
16:24:45,708 |-WARN in ch.qos.logback.classic.LoggerContext[default] - Resource [logback.xml] occurs multiple times on the classpath.
16:24:45,708 |-WARN in ch.qos.logback.classic.LoggerContext[default] - Resource [logback.xml] occurs at [file:/home/runner/work/zerocode/zerocode/core/target/classes/logback.xml]
16:24:45,708 |-WARN in ch.qos.logback.classic.LoggerContext[default] - Resource [logback.xml] occurs at [jar:file:/home/runner/.m2/repository/org/jsmart/micro-simulator/1.1.10/micro-simulator-1.1.10.jar!/logback.xml]
16:24:45,741 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - debug attribute not set
16:24:45,744 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.FileAppender]
16:24:45,748 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [fileAppender]
16:24:45,764 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property
16:24:45,794 |-INFO in ch.qos.logback.core.FileAppender[fileAppender] - File property is set to [target/logs/zerocode_rest_bdd_logs.log]
16:24:45,795 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender]
16:24:45,796 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [consoleAppender]
16:24:45,801 |-WARN in ch.qos.logback.core.ConsoleAppender[consoleAppender] - This appender no longer admits a layout as a sub-component, set an encoder instead.
16:24:45,801 |-WARN in ch.qos.logback.core.ConsoleAppender[consoleAppender] - To ensure compatibility, wrapping your layout in LayoutWrappingEncoder.
16:24:45,801 |-WARN in ch.qos.logback.core.ConsoleAppender[consoleAppender] - See also http://logback.qos.ch/codes.html#layoutInsteadOfEncoder for details
16:24:45,801 |-INFO in ch.qos.logback.classic.joran.action.RootLoggerAction - Setting level of ROOT logger to INFO
16:24:45,801 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [fileAppender] to Logger[ROOT]
16:24:45,801 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [consoleAppender] to Logger[ROOT]
16:24:45,801 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - End of configuration.
16:24:45,802 |-INFO in ch.qos.logback.classic.joran.JoranConfigurator@481a15ff - Registering current configuration as safe fallback point

This build:

[INFO] -------------------------------------------------------
[INFO]  T E S T S
[INFO] -------------------------------------------------------
[INFO] Running org.jsmart.zerocode.filebody.ReuseFileBodyTest
02:13:25,752 |-INFO in ch.qos.logback.classic.LoggerContext[default] - This is logback-classic version 1.3.14
02:13:25,753 |-INFO in ch.qos.logback.classic.util.ContextInitializer@501edcf1 - No custom configurators were discovered as a service.
02:13:25,753 |-INFO in ch.qos.logback.classic.util.ContextInitializer@501edcf1 - Trying to configure with ch.qos.logback.classic.joran.SerializedModelConfigurator
02:13:25,754 |-INFO in ch.qos.logback.classic.util.ContextInitializer@501edcf1 - Constructed configurator of type class ch.qos.logback.classic.joran.SerializedModelConfigurator
02:13:25,754 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback-test.scmo]
02:13:25,754 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback.scmo]
02:13:25,755 |-INFO in ch.qos.logback.classic.util.ContextInitializer@501edcf1 - ch.qos.logback.classic.joran.SerializedModelConfigurator.configure() call lasted 1 milliseconds. ExecutionStatus=INVOKE_NEXT_IF_ANY
02:13:25,755 |-INFO in ch.qos.logback.classic.util.ContextInitializer@501edcf1 - Trying to configure with ch.qos.logback.classic.util.DefaultJoranConfigurator
02:13:25,755 |-INFO in ch.qos.logback.classic.util.ContextInitializer@501edcf1 - Constructed configurator of type class ch.qos.logback.classic.util.DefaultJoranConfigurator
02:13:25,755 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback-test.xml]
02:13:25,756 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found resource [logback.xml] at [file:/home/runner/work/zerocode/zerocode/core/target/classes/logback.xml]
02:13:25,756 |-WARN in ch.qos.logback.classic.util.DefaultJoranConfigurator@78b729e6 - Resource [logback.xml] occurs multiple times on the classpath.
02:13:25,756 |-WARN in ch.qos.logback.classic.util.DefaultJoranConfigurator@78b729e6 - Resource [logback.xml] occurs at [file:/home/runner/work/zerocode/zerocode/core/target/classes/logback.xml]
02:13:25,756 |-WARN in ch.qos.logback.classic.util.DefaultJoranConfigurator@78b729e6 - Resource [logback.xml] occurs at [jar:file:/home/runner/.m2/repository/org/jsmart/micro-simulator/1.1.10/micro-simulator-1.1.10.jar!/logback.xml]
02:13:25,835 |-INFO in ch.qos.logback.core.model.processor.AppenderModelHandler - Processing appender named [fileAppender]
02:13:25,835 |-INFO in ch.qos.logback.core.model.processor.AppenderModelHandler - About to instantiate appender of type [ch.qos.logback.core.FileAppender]
02:13:25,842 |-INFO in ch.qos.logback.core.model.processor.ImplicitModelHandler - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property
02:13:25,871 |-INFO in ch.qos.logback.core.FileAppender[fileAppender] - File property is set to [target/logs/zerocode_rest_bdd_logs.log]
02:13:25,872 |-INFO in ch.qos.logback.core.model.processor.AppenderModelHandler - Processing appender named [consoleAppender]
02:13:25,872 |-INFO in ch.qos.logback.core.model.processor.AppenderModelHandler - About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender]
02:13:25,873 |-INFO in ch.qos.logback.core.model.processor.ImplicitModelHandler - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property
02:13:25,874 |-INFO in ch.qos.logback.classic.model.processor.RootLoggerModelHandler - Setting level of ROOT logger to INFO
02:13:25,874 |-INFO in ch.qos.logback.core.model.processor.AppenderRefModelHandler - Attaching appender named [fileAppender] to Logger[ROOT]
02:13:25,874 |-INFO in ch.qos.logback.core.model.processor.AppenderRefModelHandler - Attaching appender named [consoleAppender] to Logger[ROOT]
02:13:25,874 |-INFO in ch.qos.logback.core.model.processor.DefaultProcessor@6b4a4e18 - End of configuration.
02:13:25,875 |-INFO in ch.qos.logback.classic.joran.JoranConfigurator@27c86f2d - Registering current configuration as safe fallback point
02:13:25,875 |-INFO in ch.qos.logback.classic.util.ContextInitializer@501edcf1 - ch.qos.logback.classic.util.DefaultJoranConfigurator.configure() call lasted 120 milliseconds. 

@baulea
Copy link
Contributor Author

baulea commented Mar 3, 2024

Hi @a1shadows, the log entries logback outputs while reading its configuration files changed with the new version of logback. But the additional entries are only of type "INFO"l. Some of them are about a new feature called SerializedModelConfigurator like "Could NOT find resource [logback.scmo]", (https://logback.qos.ch/manual/configuration.html). Other log entries from the application itself did not change.
I could not find any problem with the new version of logback. @a1shadows , did you notice any problems?

@a1shadows
Copy link
Collaborator

I could not find any problem with the new version of logback. @a1shadows , did you notice any problems?

No, looks good to me. Just thought to capture the log diff for future reference. Looks good to merge

Copy link
Collaborator

@a1shadows a1shadows left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

junit5-testing/pom.xml Outdated Show resolved Hide resolved
@a1shadows a1shadows merged commit f4cf96e into authorjapps:master Mar 10, 2024
1 check passed
@baulea baulea deleted the upgrade_logback branch March 10, 2024 11:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants