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

argparse & logging #92

Merged
merged 44 commits into from
Dec 20, 2016
Merged

Conversation

RecursiveForest
Copy link
Contributor

  • Remove python-command dependency and replace it with argparse
  • Remove flog dependency and replace it with logging

I recommend squash merging, just keeping the commit history in the merge commit.

There should be no major behaviour changes for command parsing, but RIP_DEBUG has been replaced with WHIPPER_DEBUG and takes python standard logging levels (e.g., "DEBUG", "INFO") as its argument instead of an arbitrary number. WHIPPER_LOGFILE has been introduced so logging isn't intermixed with stderr messages unless the user opts in with 2>. The default is to log to stderr at level 'WARNING' & above (the unused 'ERROR' and 'CRITITCAL').

The semantics between WARNING and ERROR levels are not well explored in the code, and there are some sections that should use logging that don't. Future work should address this.

- use logging instead of flog for non-extern modules
- use WHIPPER_DEBUG and WHIPPER_LOGFILE env variables
- Convert log.* calls to logger.*
- Remove morituri.common.log imports
- inline into __init__
- throw IOError instead of Exception for missing drives
- remove CommandError checking in rip/main
- remove command.CommandError occurrences
- remove python-command external module
- mv common.command to command.basecommand
- move TEMPLATES used only by rip.cd out of rip.common
- update entry point for command to command.main
@RecursiveForest RecursiveForest changed the title Argparse & logging argparse & logging Dec 19, 2016
@MerlijnWajer
Copy link
Collaborator

I don't know if it's required, but I am ACKing the suggested changes. A squash-merge indeed seems like the proper merge here. (@JoeLametta: Let me know if you need help with that)

@JoeLametta JoeLametta merged commit d1ed80d into whipper-team:master Dec 20, 2016
@JoeLametta
Copy link
Collaborator

Merged, thanks!

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

Successfully merging this pull request may close these issues.

3 participants