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

Update logback to 1.5.16 #2995

Merged
merged 2 commits into from
Feb 6, 2025
Merged

Update logback to 1.5.16 #2995

merged 2 commits into from
Feb 6, 2025

Conversation

pm47
Copy link
Member

@pm47 pm47 commented Feb 5, 2025

As logback 1.2.x is unmaintained: https://logback.qos.ch/news.html.

Akka is pulling an old version of slf4j which makes the build fail, we explicitly request slf4j-api 2.0.16, which should be a drop-in replacement: https://www.slf4j.org/faq.html#changesInVersion200

@sstone I think we should use SHA256 instead of SHA512, those long hashes are annoying and don't bring more security. And we are using SHA256 everywhere else.

@pm47 pm47 requested a review from t-bast February 5, 2025 16:07
@pm47

This comment was marked as outdated.

@sstone
Copy link
Member

sstone commented Feb 5, 2025

@sstone I think we should use SHA256 instead of SHA512, those long hashes are annoying and don't bring more security. And we are using SHA256 everywhere else.

done in #2998

As logback 1.2.x is unmaintained: https://logback.qos.ch/news.html.

Akka is pulling an old version of slf4j which makes the build fail, we
explicitly request slf4j-api 2.0.16, which should be a drop-in
replacement: https://www.slf4j.org/faq.html#changesInVersion200
@pm47
Copy link
Member Author

pm47 commented Feb 6, 2025

Rebased

@pm47 pm47 requested review from sstone and removed request for t-bast February 6, 2025 10:20
t-bast
t-bast previously approved these changes Feb 6, 2025
Copy link
Member

@t-bast t-bast left a comment

Choose a reason for hiding this comment

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

LGTM. One notable change with this version of logback is that when we run eclair, we previously didn't have anything output to the console, but now logback logs its own log lines to the console. Here is what I'm seeing when starting eclair:

11:29:56,381 |-INFO in ch.qos.logback.classic.LoggerContext[default] - This is logback-classic version 1.5.16
11:29:56,382 |-INFO in ch.qos.logback.classic.util.ContextInitializer@467f77a5 - No custom configurators were discovered as a service.
11:29:56,382 |-INFO in ch.qos.logback.classic.util.ContextInitializer@467f77a5 - Trying to configure with ch.qos.logback.classic.joran.SerializedModelConfigurator
11:29:56,383 |-INFO in ch.qos.logback.classic.util.ContextInitializer@467f77a5 - Constructed configurator of type class ch.qos.logback.classic.joran.SerializedModelConfigurator
11:29:56,387 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback-test.scmo]
11:29:56,387 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback.scmo]
11:29:56,394 |-INFO in ch.qos.logback.classic.util.ContextInitializer@467f77a5 - ch.qos.logback.classic.joran.SerializedModelConfigurator.configure() call lasted 5 milliseconds. ExecutionStatus=INVOKE_NEXT_IF_ANY
11:29:56,394 |-INFO in ch.qos.logback.classic.util.ContextInitializer@467f77a5 - Trying to configure with ch.qos.logback.classic.util.DefaultJoranConfigurator
11:29:56,394 |-INFO in ch.qos.logback.classic.util.ContextInitializer@467f77a5 - Constructed configurator of type class ch.qos.logback.classic.util.DefaultJoranConfigurator
11:29:56,397 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found resource [.eclair/logback.xml] at [file:/home/bast/Documents/lightning/lightning-cfg/.eclair/logback.xml]
11:29:56,652 |-INFO in ch.qos.logback.core.model.processor.conditional.IfModelHandler - Condition [isDefined("eclair.printToConsole")] evaluated to false on line 40
11:29:56,654 |-WARN in ch.qos.logback.core.model.processor.AppenderModelHandler - Appender named [CONSOLE] not referenced. Skipping further processing.
11:29:56,654 |-INFO in ch.qos.logback.core.model.processor.AppenderModelHandler - Processing appender named [ROLLING]
11:29:56,654 |-INFO in ch.qos.logback.core.model.processor.AppenderModelHandler - About to instantiate appender of type [ch.qos.logback.core.rolling.RollingFileAppender]
11:29:56,660 |-INFO in ch.qos.logback.core.model.processor.ModelInterpretationContext@1bb9aa43 - value ".eclair/alice/eclair.log" substituted for "${eclair.datadir:-${user.home}/.eclair}/eclair.log"
11:29:56,663 |-INFO in ch.qos.logback.core.model.processor.ModelInterpretationContext@1bb9aa43 - value ".eclair/alice/eclair.%d{yyyy-MM-dd}.log" substituted for "${eclair.datadir:-${user.home}/.eclair}/eclair.%d{yyyy-MM-dd}.log"
11:29:56,667 |-INFO in c.q.l.core.rolling.TimeBasedRollingPolicy@1108066952 - setting totalSizeCap to 5 GB
11:29:56,682 |-INFO in c.q.l.core.rolling.TimeBasedRollingPolicy@1108066952 - No compression will be used
11:29:56,683 |-INFO in c.q.l.core.rolling.TimeBasedRollingPolicy@1108066952 - Will use the pattern .eclair/alice/eclair.%d{yyyy-MM-dd}.log for the active file
11:29:56,699 |-INFO in c.q.l.core.rolling.DefaultTimeBasedFileNamingAndTriggeringPolicy - The date pattern is 'yyyy-MM-dd' from file name pattern '.eclair/alice/eclair.%d{yyyy-MM-dd}.log'.
11:29:56,699 |-INFO in c.q.l.core.rolling.DefaultTimeBasedFileNamingAndTriggeringPolicy - Roll-over at midnight.
11:29:56,704 |-INFO in c.q.l.core.rolling.DefaultTimeBasedFileNamingAndTriggeringPolicy - Setting initial period to 2025-02-06T10:29:56.704Z
11:29:56,705 |-INFO in ch.qos.logback.core.model.processor.ImplicitModelHandler - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property
11:29:56,732 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[ROLLING] - Active log file name: .eclair/alice/eclair.log
11:29:56,732 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[ROLLING] - File property is set to [.eclair/alice/eclair.log]
11:29:56,733 |-INFO in ch.qos.logback.core.model.processor.AppenderModelHandler - Processing appender named [ROLLING_NOTIFICATIONS]
11:29:56,733 |-INFO in ch.qos.logback.core.model.processor.AppenderModelHandler - About to instantiate appender of type [ch.qos.logback.core.rolling.RollingFileAppender]
11:29:56,733 |-INFO in ch.qos.logback.core.model.processor.ModelInterpretationContext@1bb9aa43 - value ".eclair/alice/notifications.log" substituted for "${eclair.datadir:-${user.home}/.eclair}/notifications.log"
11:29:56,733 |-INFO in ch.qos.logback.core.model.processor.ModelInterpretationContext@1bb9aa43 - value ".eclair/alice/notifications.%d{yyyy-MM-dd}.log" substituted for "${eclair.datadir:-${user.home}/.eclair}/notifications.%d{yyyy-MM-dd}.log"
11:29:56,733 |-INFO in c.q.l.core.rolling.TimeBasedRollingPolicy@234223040 - setting totalSizeCap to 1 GB
11:29:56,734 |-INFO in c.q.l.core.rolling.TimeBasedRollingPolicy@234223040 - No compression will be used
11:29:56,734 |-INFO in c.q.l.core.rolling.TimeBasedRollingPolicy@234223040 - Will use the pattern .eclair/alice/notifications.%d{yyyy-MM-dd}.log for the active file
11:29:56,734 |-INFO in c.q.l.core.rolling.DefaultTimeBasedFileNamingAndTriggeringPolicy - The date pattern is 'yyyy-MM-dd' from file name pattern '.eclair/alice/notifications.%d{yyyy-MM-dd}.log'.
11:29:56,734 |-INFO in c.q.l.core.rolling.DefaultTimeBasedFileNamingAndTriggeringPolicy - Roll-over at midnight.
11:29:56,734 |-INFO in c.q.l.core.rolling.DefaultTimeBasedFileNamingAndTriggeringPolicy - Setting initial period to 2025-02-06T10:29:56.734Z
11:29:56,735 |-INFO in ch.qos.logback.core.model.processor.ImplicitModelHandler - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property
11:29:56,735 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[ROLLING_NOTIFICATIONS] - Active log file name: .eclair/alice/notifications.log
11:29:56,735 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[ROLLING_NOTIFICATIONS] - File property is set to [.eclair/alice/notifications.log]
11:29:56,736 |-INFO in ch.qos.logback.classic.model.processor.LoggerModelHandler - Setting level of logger [notifications] to INFO
11:29:56,737 |-INFO in ch.qos.logback.classic.model.processor.LoggerModelHandler - Setting additivity of logger [notifications] to false
11:29:56,738 |-INFO in ch.qos.logback.core.model.processor.AppenderRefModelHandler - Attaching appender named [ROLLING_NOTIFICATIONS] to Logger[notifications]
11:29:56,738 |-INFO in ch.qos.logback.classic.model.processor.LoggerModelHandler - Setting level of logger [fr.acinq.eclair.channel.publish] to DEBUG
11:29:56,738 |-INFO in ch.qos.logback.classic.model.processor.LoggerModelHandler - Setting level of logger [fr.acinq.eclair.payment] to DEBUG
11:29:56,738 |-INFO in ch.qos.logback.classic.model.processor.RootLoggerModelHandler - Setting level of ROOT logger to INFO
11:29:56,738 |-INFO in ch.qos.logback.core.model.processor.AppenderRefModelHandler - Attaching appender named [ROLLING] to Logger[ROOT]
11:29:56,738 |-INFO in ch.qos.logback.core.model.processor.DefaultProcessor@308a6984 - End of configuration.
11:29:56,739 |-INFO in ch.qos.logback.classic.joran.JoranConfigurator@66b72664 - Registering current configuration as safe fallback point
11:29:56,739 |-INFO in ch.qos.logback.classic.util.ContextInitializer@467f77a5 - ch.qos.logback.classic.util.DefaultJoranConfigurator.configure() call lasted 345 milliseconds. ExecutionStatus=DO_NOT_INVOKE_NEXT_IF_ANY

@pm47
Copy link
Member Author

pm47 commented Feb 6, 2025

Oops, it shows due to the WARN line (I fixed it in logback-test.xml)

@sstone
Copy link
Member

sstone commented Feb 6, 2025

I've checked that I can generate the same checksums. Does the new logback support the same type of network appender ?

@pm47
Copy link
Member Author

pm47 commented Feb 6, 2025

Does the new logback support the same type of network appender ?

The SocketAppender is still there and hasn't changed in 3 years, so I guess yes. Will test on endurance though.

@pm47 pm47 requested a review from t-bast February 6, 2025 12:07
@pm47 pm47 merged commit ee70529 into master Feb 6, 2025
1 check passed
@pm47 pm47 deleted the update-logback branch February 6, 2025 12:37
pm47 added a commit that referenced this pull request Feb 6, 2025
pm47 added a commit that referenced this pull request Feb 7, 2025
There were more unused appenders.
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.

3 participants