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

Duplicate logging information #95

Closed
dgasmith opened this issue May 28, 2019 · 4 comments
Closed

Duplicate logging information #95

dgasmith opened this issue May 28, 2019 · 4 comments

Comments

@dgasmith
Copy link
Contributor

run_json was changed so that both logging.config.fileConfig and a new log handler are created causing geometric to dump its logging to both stdout and the string stream. I don't know why it was changed this way, but it clouds up many downstream logging files. Would it be possible to remove one of these logging handler initializations?

Simply commenting out run_json:157-159 is sufficient and is slightly concerning as the logging state is reset outside of a non main initialization function.

@leeping
Copy link
Owner

leeping commented May 28, 2019

Hi Daniel,

Those changes were made around the time I reconfigured the geomeTRIC loggers to require an explicit newline character for every logging message, as I had some situations where I wanted finer control over whether newline characters were being printed or not.

I think replacing handlers=stream_handler with handlers= in line 12 of logJson.ini might also resolve the issue, though it disables printing to stdout when I run the unit tests.

Is there any way I could see the stdout from running the unit tests without duplicating the logging on your side? If you could just show me how to print out the string stream in the unit test codes, that should resolve it.

@dgasmith
Copy link
Contributor Author

dgasmith commented May 28, 2019

For running through the QCFractal pipeline, we would like all stdout to be contained within with stdout field. If you run the JSON test you can have a print(ret["stdout"]) or similar line. The way we had this previously (I believe) was that the run_json would temporarily remove the old handler which likely dumped to stdout and replace it with it with a handler that was based of StringIO and replace the old handle when complete.

You could consider an option on the run_json command to turn back on stdout stream printing while running tests.

@leeping
Copy link
Owner

leeping commented May 28, 2019

Release 0.9.7.2 is now out, could you please check to see if it resolved our two logging issues (as well as the other connectivity-related issue in your PR)?

@dgasmith
Copy link
Contributor Author

Perfect on our end! Thanks for the quick turnaround.

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

2 participants