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

Use SLF4J for logging #155

Closed
sbliven opened this issue Aug 26, 2014 · 8 comments
Closed

Use SLF4J for logging #155

sbliven opened this issue Aug 26, 2014 · 8 comments
Labels
enhancement Improvement of existing code or method
Milestone

Comments

@sbliven
Copy link
Member

sbliven commented Aug 26, 2014

I believe we reached a consensus on the mailing list to use slf4j for logging, due to its easy interoperability with other logging frameworks.

The “beauty" of slf4j is that it provides a logging framework that doesn’t impose any downstream restrictions or requirements and will actually insulate users from logging dependencies that come from other third-party libraries that you may include. It allows the end user to include the logging framework of their choice, defaulting to a NOP version if none is specified.
-- Andy Law, biojava-dev list, May 25, 2014

Todo:

  • Create a usage policy & documentation (http://www.biojava.org/wiki/BioJava3_logging)
  • Add slf4j & an implementation to the pom file
  • Change any existing uses of java.util.logging to use slf4j (there shouldn't be any many of these)
  • Convert println/printStackTrace statements to logger calls

This would be a great project for someone trying to start contributing to BioJava.

@sbliven sbliven added this to the BioJava 4.0.0 milestone Aug 26, 2014
@heuermh
Copy link
Member

heuermh commented Aug 26, 2014

+1, and biojava-legacy too.

Just make sure that the only compile time dependency is on slf4j-api. There may be a test scoped dependency on say slf4j-simple for logging during unit tests.

This was referenced Aug 27, 2014
josemduarte added a commit to josemduarte/biojava that referenced this issue Aug 28, 2014
- added runTime scope binding for log4j2 since it's the one logger
framework that was used already elsewhere. We even had already some
config files for it in the structure module
- added the safe config to all poms of modules. Config files for log4j2
are only in the structure module. Other modules will have to add config
files if needed
- default level in config files set to: warn for run, info for test
- moved logging in the PDB parser to slf4j
josemduarte added a commit that referenced this issue Aug 28, 2014
josemduarte added a commit to josemduarte/biojava that referenced this issue Aug 28, 2014
josemduarte added a commit that referenced this issue Aug 28, 2014
josemduarte added a commit to josemduarte/biojava that referenced this issue Aug 29, 2014
josemduarte added a commit to josemduarte/biojava that referenced this issue Aug 29, 2014
sbliven added a commit to sbliven/biojava-sbliven that referenced this issue Aug 29, 2014
Test configuration uses INFO and production uses WARN
josemduarte added a commit to josemduarte/biojava that referenced this issue Aug 29, 2014
josemduarte added a commit to josemduarte/biojava that referenced this issue Aug 30, 2014
josemduarte added a commit to josemduarte/biojava that referenced this issue Aug 31, 2014
josemduarte added a commit to josemduarte/biojava that referenced this issue Sep 17, 2014
josemduarte added a commit that referenced this issue Sep 17, 2014
Convert core package to use slf4j #155
josemduarte added a commit that referenced this issue Sep 18, 2014
Convert aaproperties and alignment packages to slf4j #155
josemduarte added a commit that referenced this issue Sep 19, 2014
Convert org.biojava3.genome to slf4j #155
josemduarte added a commit to josemduarte/biojava that referenced this issue Sep 20, 2014
- some improvement in exceptions and logging biojava#111 and biojava#155
josemduarte added a commit to josemduarte/biojava that referenced this issue Sep 20, 2014
- some improvement in exceptions and logging biojava#111 and biojava#155
josemduarte added a commit to josemduarte/biojava that referenced this issue Sep 20, 2014
andreasprlic added a commit that referenced this issue Sep 22, 2014
Updated packages to use slf4j for logging #155
josemduarte added a commit to josemduarte/biojava that referenced this issue Sep 28, 2014
- also improvements for biojava#111 and biojava#155
- some more work to do to make sure AtomCache and the Readers don't
double read the environment variables/system properties
josemduarte added a commit to josemduarte/biojava that referenced this issue Oct 1, 2014
- reduced the number of initialisations in AtomCache and readers
- now all chem comp providers use PDB_CACHE_DIR
- a few biojava#111 and biojava#155 fixes
josemduarte added a commit to josemduarte/biojava that referenced this issue Oct 1, 2014
josemduarte added a commit to josemduarte/biojava that referenced this issue Oct 6, 2014
@andreasprlic
Copy link
Member

can we close this?

@josemduarte
Copy link
Contributor

Indeed there's been enormous progress in this. But I'd say that the structure package needs some more work, there's still quite a few hidden prints to stdout/stderr. Let's give it a bit more time.

andreasprlic added a commit that referenced this issue Oct 11, 2014
Update org.biojava.bio.structure (main) package in biojava3-structure project to use slf4j #155
josemduarte added a commit to josemduarte/biojava that referenced this issue Oct 28, 2014
- also some improvement for biojava#191: now a TranslationException will be
thrown when compound not known
- a few improvements for other issues: biojava#111, biojava#155, biojava#185
josemduarte added a commit that referenced this issue Nov 21, 2014
josemduarte added a commit to josemduarte/biojava that referenced this issue Nov 25, 2014
josemduarte added a commit to josemduarte/biojava that referenced this issue Nov 27, 2014
josemduarte added a commit to josemduarte/biojava that referenced this issue Dec 9, 2014
@sbliven
Copy link
Member Author

sbliven commented Jan 6, 2015

How about now, @josemduarte? Logging doesn't change the API, so it can easily go out in patch commits.

@josemduarte
Copy link
Contributor

Yep let's close it, I think the logging coverage now is quite decent. Surely there must be some other places with missing logging but we can add more commits later

josemduarte added a commit to josemduarte/biojava that referenced this issue Jan 6, 2015
josemduarte added a commit to josemduarte/biojava that referenced this issue Jan 6, 2015
@dmyersturnbull
Copy link
Contributor

Re-opening this for now so that I can reference it in commits.

dmyersturnbull added a commit to dmyersturnbull/biojava that referenced this issue Jan 21, 2015
…ied some code, made clone() call super.clone(), and switched from StringWriter and StringBuffer to the faster (asynchronous) StringBuilder.
dmyersturnbull added a commit to dmyersturnbull/biojava that referenced this issue Jan 21, 2015
…ied some code, made clone() call super.clone(), and switched from StringWriter and StringBuffer to the faster (asynchronous) StringBuilder.

Small improvements to rcsb package and to Astral class.
dmyersturnbull added a commit to dmyersturnbull/biojava that referenced this issue Jan 21, 2015
…ied some code, made clone() call super.clone(), and switched from StringWriter and StringBuffer to the faster (asynchronous) StringBuilder.

Small improvements to rcsb package and to Astral class.
dmyersturnbull added a commit to dmyersturnbull/biojava that referenced this issue Jan 21, 2015
…ied some code, made clone() call super.clone(), and switched from StringWriter and StringBuffer to the faster (asynchronous) StringBuilder.

Small improvements to rcsb package and to Astral class.
dmyersturnbull added a commit to dmyersturnbull/biojava that referenced this issue Jan 21, 2015
…ied some code, made clone() call super.clone(), and switched from StringWriter and StringBuffer to the faster (asynchronous) StringBuilder.

Small improvements to rcsb package and to Astral class.
@sbliven
Copy link
Member Author

sbliven commented Jan 23, 2015

Can't you reference a closed issue? jose's commits seem to have been picked up after it closed.

@dmyersturnbull
Copy link
Contributor

Yes, apparently I can! (I didn't know.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improvement of existing code or method
Projects
None yet
Development

No branches or pull requests

5 participants