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

Logger level INFO should stream to stdout, not stderr #72

Open
c-dilks opened this issue Aug 3, 2023 · 0 comments
Open

Logger level INFO should stream to stdout, not stderr #72

c-dilks opened this issue Aug 3, 2023 · 0 comments

Comments

@c-dilks
Copy link
Member

c-dilks commented Aug 3, 2023

Test:

// test_reader.groovy

import org.jlab.io.hipo.HipoDataSource

def inHipo = args[0]

def reader = new HipoDataSource()
reader.open(inHipo)
reader.close()

Run with:

run-groovy test_reader.groovy example_hipo_file.hipo >log.stdout 2>log.stderr

Expected result:

log.stderr should be empty, indicating no errors (nothing streamed to stderr)

Actual result:

log.stderr contains

[DataSourceDump] --> opened file with events #

which appears to originate from

LOGGER.log(Level.INFO,"[DataSourceDump] --> opened file with events # " );

This is an INFO level printout, and it would be preferable not to have it streamed to stderr (especially for the case of running batch jobs, where parsing multiple error logs is essential).

Feature request:

  • send INFO to stdout and send WARNING and SEVERE to stderr; this may not be easy but something like https://stackoverflow.com/a/23717493 may be related.
  • aside: there are some cases of System.out.println("ERROR: ..."); which should either be changed to System.err.println or use an appropriate Logger level
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

No branches or pull requests

1 participant