Shell logs should be without timestamps and function names
Closed this issue · 3 comments
misohu commented
Why it needs to get done
For the shell logs of DSS we don't want to have timestamps and function names included. e.g.
2024-04-17 11:04:49 [INFO] [list] [list_notebooks]:
What needs to get done
Rewrite the logging logic not to include this information for shell logs.
When is the task considered done
Shell logs does not include timestamps and function names.
syncronize-issues-to-jira commented
Thank you for reporting us your feedback!
The internal ticket has been created: https://warthogs.atlassian.net/browse/KF-5577.
This message was autogenerated
misohu commented
General logging changes:
- for console omit the timestamp and module name + function name
- for console print to stdout instead of std err
- for file print with timestamp and module and function
- info warning and error logs should be print to console
- debug should be only print to file
We use logger.info
to print the outputs of commands and hints:
e.g.
logger.info(
f"Removing the notebook {name}. Check `dss list` for the status of the notebook."
)
or
logger.info("Note: You might want to run")
logger.info(" dss status to check the current status")
logger.info(f" dss logs {name} to review the notebook logs")
We use logger.error to print error messages in modules and in main.
logger.error(f"Failed to remove notebook {name}.")
We use logger.debug
to store tracebacks and errors. e.g. (make sure traceback is stored in logsfile)
logger.debug(f"Failed to stop notebook {e}")