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

Updates the logging system #106

Merged
merged 10 commits into from
Nov 9, 2021
Merged

Conversation

joaomcteixeira
Copy link
Member

@joaomcteixeira joaomcteixeira commented Nov 4, 2021

Redoing in a different way after comments in #97

Updates and cleans the logging system.

  • added complete control to where the logging messages are saved
  • standard output is saved to stdout. Before it was saved to stderr because of the default value of StreamHandler. This is noted mostly when running SBATCH
  • error messages as saved also to stderr
  • logging is saved in file log inside the run folder.

I needed to do a quick trick to keep the logging in stdout and in the log file to accommodate the first steps during the configuration reading. Basically, messages are reported to stdout and to a StringIO until the log file is defined. After that, the buffer in StringIO is saved to the log file, and the logging continues normally after that. See clis/cli.py.

This PR does not clean the logging messages per se, nor does it adds progression bars as discussed in #97. Instead, this PR just updates the logging system itself. These other functionalities will be built on top of this and will be submitted in other PRs.

@joaomcteixeira joaomcteixeira self-assigned this Nov 4, 2021
@joaomcteixeira joaomcteixeira changed the title Logsystem Updates the logging system Nov 4, 2021
@joaomcteixeira joaomcteixeira added the enhancement Enhancing an existing feature of adding a new one label Nov 4, 2021
@joaomcteixeira joaomcteixeira added this to the v3.0.0 stable release milestone Nov 4, 2021
@joaomcteixeira joaomcteixeira marked this pull request as ready for review November 4, 2021 23:30
Copy link
Member

@amjjbonvin amjjbonvin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems fine to me - the logic makes sense.
But git report conflicts that need to be resolved manually

@joaomcteixeira
Copy link
Member Author

Yes, now gives the expected output (not file size), running with sbatch on tintin:

 1 -rw-r--r--. 1 joaomctx users     0 Nov  5 14:03 hd3_scoring_err
 9 -rw-r--r--. 1 joaomctx users  4091 Nov  5 14:03 hd3_scoring_out

@joaomcteixeira joaomcteixeira merged commit 6d4a0b2 into haddocking:main Nov 9, 2021
@joaomcteixeira joaomcteixeira deleted the logsystem branch November 9, 2021 22:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancing an existing feature of adding a new one
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants