8000 Replace slf4j-log4j12 with logback by jamesaoverton · Pull Request #948 · ontodev/robot · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Replace slf4j-log4j12 with logback #948

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

Merged
merged 3 commits into from
Dec 15, 2021
Merged

Replace slf4j-log4j12 with logback #948

merged 3 commits into from
Dec 15, 2021

Conversation

jamesaoverton
Copy link
Member
@jamesaoverton jamesaoverton commented Dec 10, 2021
  • docs/ have been added/updated
  • tests have been added/updated
  • mvn verify says all tests pass
  • mvn site says all JavaDocs correct
  • CHANGELOG.md has been updated

ROBOT uses slf4j-log4j12 1.7.30 for logging, which pulls in log4j 1.2.17. Log4j 1.2.17 is no longer supported, and has known vulnerabilities: https://logging.apache.org/log4j/1.2/index.html. I would like to try replacing it with logback-classic 1.2.7.

@jamesaoverton jamesaoverton marked this pull request as draft December 10, 2021 15:33
@jamesaoverton
Copy link
Member Author

@beckyjackson This passes tests but since there's no logback configuration it's very noisy. We need:

  1. logback configuration eqivalent to https://github.com/ontodev/robot/blob/master/robot-core/src/main/resources/log4j.properties and https://github.com/ontodev/robot/blob/master/robot-command/src/main/resources/log4j.properties
  2. update the -vvv handling here https://github.com/ontodev/robot/blob/master/robot-command/src/main/java/org/obolibrary/robot/CommandLineHelper.java#L948

Can you please try to make this work?

@beckyjackson
Copy link
Contributor

Those two items are working now, but we can't remove those old log4j.properties files. If we do, we get this message from ELK:

log4j:WARN No appenders could be found for logger (org.semanticweb.elk.config.ConfigurationFactory).
log4j:WARN Please initialize the log4j system properly.

@jamesaoverton
Copy link
Member Author

@beckyjackson Can you please try excluding the log4j from the elk import, and importing org.slf4j:log4j-over-slf4j:1.7.32 instead? I'm hoping that will replace log4j in elk with some slf4j classes, which will then use logback.

@jamesaoverton jamesaoverton marked this pull request as ready for review December 13, 2021 20:37
@jamesaoverton
Copy link
Member Author

@ontodev/robot-team Hi everyone. Would dropping log4j in favour of logback like this cause problems for anyone? I would really like to merge this, so please don't hesitate to let us know!

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.

2 participants
0