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

Remove apache commons logging in favor of slf4j + log4j for JAVA 9 #3653

Merged
merged 8 commits into from
Jan 22, 2018

Conversation

Siedlerchr
Copy link
Member

@Siedlerchr Siedlerchr commented Jan 20, 2018

While testing with Java 9, I noticed that commons logging infrastructure we use is not compatible.
However, sfl4j + log4j2 are already java 9 compatible.

Added ADR


  • Change in CHANGELOG.md described
  • Tests created for changes
  • Screenshots added (for bigger UI changes)
  • Manually tested changed features in running JabRef
  • Check documentation status (Issue created for outdated help page at help.jabref.org?)

@Siedlerchr Siedlerchr added status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers architecture labels Jan 20, 2018
Copy link
Member

@lenhard lenhard left a comment

Choose a reason for hiding this comment

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

I'll admit that I haven't looked through every single statement, since most of them are practically identical. Nevertheless, I think this is good to go. Updating/removing ancient dependencies is always appreciated and here it is especially nice that there are so little changes except for the logger declarations.

The build failure is just down to the fetcher that you've fixed in a different PR, as far as I can see.

@Siedlerchr
Copy link
Member Author

The breaking build is still from the test I fixed in the other pr

Copy link
Member

@koppor koppor left a comment

Choose a reason for hiding this comment

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

Looks good.

Maybe, we could also Apache Log4J2 and use LogBack completely. Currently alpha only... (https://logback.qos.ch/download.html)

@@ -0,0 +1,31 @@
# Use slf4j together with log4j2 for logging

* Currently JabRef uses apache commons logging 1.2 for logging errors and messages. However, this is not compatible with java 9 and is superseeded by log4j.
Copy link
Member

Choose a reason for hiding this comment

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

"Up to version 4.1"



## Decision Outcome

Copy link
Member

Choose a reason for hiding this comment

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

Please place the decision here. :-)

The next subsection is for a detailed elaboration.

* `+` *Already defined*
* `+` *Java 9 support*
* `-` *Direct dependency*
* *[...]* <!-- numbers of pros and cons can vary -->
Copy link
Member

Choose a reason for hiding this comment

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

Remove this line


## Decision Outcome

## Pros and Cons of the Alternatives <!-- optional -->
Copy link
Member

Choose a reason for hiding this comment

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

Remove <!-- optional -->


### *Log4j2*

* `+` *Already defined*
Copy link
Member

Choose a reason for hiding this comment

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

Please remove the stars. They are only meant as placeholders...

## Considered Alternatives

* [Log4j2](https://logging.apache.org/log4j/2.x/)
* [SLF4J](https://www.slf4j.org/)
Copy link
Member

Choose a reason for hiding this comment

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

I think, the options are:

  • Log4J2
  • SLF4J with Logback binding
  • SLF4J with Log4J binding

Because of https://logging.apache.org/log4j/2.0/log4j-slf4j-impl/, it seemed, you chose the Log4J binding

@koppor
Copy link
Member

koppor commented Jan 21, 2018

Thank you for using MADR 🎉.

@koppor
Copy link
Member

koppor commented Jan 21, 2018

Switching to logback could maybe solve #3511?

* upstream/master:
  Extend RIS import with multiple fields (#3642)
  Fix ICAR fetcher test which resulted in build failure (#3654)
add some more info to ADR

### Log4j2

* `+` Already defined
Copy link
Member

Choose a reason for hiding this comment

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

Do you mean "already defined as dependency"? --> Maybe rephrase to "Dependency already exists"

Copy link
Member

@koppor koppor left a comment

Choose a reason for hiding this comment

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

small comment remains. Otherwise: LGTM

* upstream/master:
  fix isbn fetcher test as Joshua Bloch has published a new revivsion of Effetive Java convert to junit5 jupiter
make coday happy
@lenhard
Copy link
Member

lenhard commented Jan 22, 2018

Codacy still complains about an unused import, but this is a false positive, right? Otherwise, checkstyle would complain. If this is not a problem, then this PR can be merged.

@Siedlerchr
Copy link
Member Author

Interesting case. the import was only used because it was referenced in an javadoc comment. So I removed it.

@Siedlerchr Siedlerchr merged commit cf8e6aa into master Jan 22, 2018
@Siedlerchr Siedlerchr deleted the removecommonslogging branch January 22, 2018 10:25
Siedlerchr added a commit that referenced this pull request Jan 24, 2018
* upstream/master: (46 commits)
  Replace openoffice jars with libreoffice  jars (#3662)
  Export no empty lines in RIS format (#3661)
  Remove apache commons logging in favor of slf4j + log4j for JAVA 9 (#3653)
  fix isbn fetcher test as Joshua Bloch has published a new revivsion of Effetive Java convert to junit5 jupiter
  Extend RIS import with multiple fields (#3642)
  Fix ICAR fetcher test which resulted in build failure (#3654)
  New translations JabRef_en.properties (French) (#3650)
  Add link to MADR and fix typo
  [WIP] Add "Convert to BibTeX format" cleanup (#3541)
  Fix typo
  Fix typo
  Quickfix to get build running on all platforms (#3638)
  New translations JabRef_en.properties (French)
  New translations JabRef_en.properties (Vietnamese)
  New translations JabRef_en.properties (Chinese Simplified)
  New translations JabRef_en.properties (Dutch)
  New translations JabRef_en.properties (French)
  New translations JabRef_en.properties (German)
  New translations JabRef_en.properties (Greek)
  New translations JabRef_en.properties (Indonesian)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants