-
Notifications
You must be signed in to change notification settings - Fork 8
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
[Bug]: Informative stdout gets printed to stderr #292
Comments
Inspected the situation further: In production runs now the only message indeed emitted by the converter unless there is at least a warning is alike to the above ones with always differing length. This avoids that one can check quickly just if the stderr content is 0 nothing so to skip to the next example instead of seeing some small byte payload that is always a similar message that (like the one above) that everything is right. Two possible solutions: I prefer solution 2.) as then there remains a life sign from the converter that it is doing something, relevant for NOMAD worker console and development work, but only severe issues get pumped into stderr. What are your opinions about this @sherjeelshabih @sanbrock ? |
I believe this is related to what I encountered here: FAIRmat-NFDI/pynxtools-mpes#22 (comment) As I understand it, essentially there is no handler defined for any module apart from the dataconverter itself, so their info output just gets ignored, and any warnings end up on stderr due to the "last resort" handler, which gets defined for the root logger if there is no other handler present. |
Contact Details
[email protected]
What happened?
Running pynxtools-apm using pynxtools from apm-em-tracking branch I spotted that some informative messages of the are directed to stderr although they should be directed to stdout or some other non-error-type stream.
Here an example from an otherwise finely parsing use case monitored using command line calling
dataconverter convert [nothing special here some input files ...] 1>STDOUT.txt 2>STDERR.txt
STDERR.txt contained thereafter:
Using apm reader to convert the given files:
• [...]/production/R18_53705-v03.epos
• [...]/production/R18_53705-v03.rng
• eln_data_apm.yaml
• apm.oasis.specific.yaml
The data entry corresponding to /ENTRY[entry]/definition/@Version is required and hasn't been supplied by the reader.
The output file generated: debug.aus_sydney_breen_1.nxs.
Only the line marked in bold I think warrants to be streamed to stderr as it is a warning, everything else in stdout.
The text was updated successfully, but these errors were encountered: