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

Implement logging #42

Open
mswindler opened this issue Aug 14, 2019 · 1 comment
Open

Implement logging #42

mswindler opened this issue Aug 14, 2019 · 1 comment

Comments

@mswindler
Copy link
Collaborator

Very low priority, but would be a great addition.

@mswindler
Copy link
Collaborator Author

loguru would be a nice module to use, but it is not installed on the computers so we'd need to get sudo privileges to install it.

But we could do it manually with a Logger class that handles the formatting of each message and prints it to a project log file.

Steps to implement:

1

We'd want to add a logs directory to the production folder, or maybe just inside dccpipe. It would be gitignored.

Then we'd probably have methods for:

  • print_message()

  • print_warning()

  • print_error()

that would each call a parent method that handles formatting of the actual message (i.e. adding timestamp, user, etc.)

2

We'd want to add try/except blocks inside basically all(?) methods and in the excepts we would catch the error and print it to the log file (additionally showing a message to user).

3

In existing if/else blocks for error-checking we may want to add some logging too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant