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

Errors and logs improvements #20

Merged
merged 2 commits into from
Sep 18, 2023

Conversation

Lyaaaaaaaaaaaaaaa
Copy link
Member

No description provided.

The logs were erased by the error raising when shutting down the server.
In the end, appending to the logs and just erasing it when the server
starts, is the solution employed here.

server:
- Deleted init_logger function as it has been moved to logger.py since a
while.
- Replaced the print here and there by logger.log.info
- Updated the exceptions handlers in handler to display the error.
- Updated shutdown_server to receive an exit code and to display a
message.

logger:
- Added delete_log_file function.
- Updated init_logger to call delete_log_file.

config:
- LOG_FILEMODE default value is now "a" again. The log file is now
manually deleted to avoid losing logs.
- Updated _load to display messages as error instead of info when an
error happens when loading the tokens.
- Updated __init__ to log as error "Couldn't load the model files."
instead of info.
@Lyaaaaaaaaaaaaaaa Lyaaaaaaaaaaaaaaa merged commit 1676d55 into Split-GPU-CPU Sep 18, 2023
@Lyaaaaaaaaaaaaaaa Lyaaaaaaaaaaaaaaa deleted the Errors_And_Logs_Improvements branch September 18, 2023 08:58
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.

1 participant