datahelix icon indicating copy to clipboard operation
datahelix copied to clipboard

migrate away from `System.[out|err]`

Open mrspaceman opened this issue 6 years ago • 2 comments

Feature Request

Description of Problem:

Common Consensus is to not use the System.err or System.out features to log messages, but to use a logging mechanism of some kind.

When the codebase moves to use a GUI or some other front end, the use of a logger will make it easier to catch the output messages and redirect them.

This will also allow us to have debug log messages which can be turned off via a config file/command line switch.

Potential Solutions:

migrate to use slf4j as a logging abstraction layer and logback or log4j as the logging backend.

Steps to implement:

  • [ ] add dependancies to pom.xml files
  • [ ] add logback.xml or log4j.xml configuration file
  • [ ] migrate System,err calls to logger.error calls
  • [ ] migrate System,out calls to logger.info or logger.debug calls
  • [ ] add command line switch to alter logging verbosity level

Acceptance Criteria:

  • [ ] no uses of System.out exist in the codebase
  • [ ] no uses of System.err exist in the codebase

mrspaceman avatar Feb 20 '19 10:02 mrspaceman

Possible default logback.xml file and Logging.md

Logging.md.txt logback.xml.txt

mrspaceman avatar Feb 25 '19 16:02 mrspaceman

Whichever product is selected needs to match the license for this product. Log4j is under an Apache license, logback is under a LGPL license.

Log4j may be best as we are already covered by an Apache license.

We also need to check that any selected will work with java 1.8 without restriction or issue

sl-slaing avatar Feb 25 '19 17:02 sl-slaing