Open mswindler opened 5 years ago
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.
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.)
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).
In existing if/else blocks for error-checking we may want to add some logging too.
Very low priority, but would be a great addition.