Skip to content

Conversation

@sombrafam
Copy link

@sombrafam sombrafam commented Sep 10, 2024

Approved Issue:

Description

This commit adds new framework for logging across modules. It allows amongst other things:

  • several levels of logging (ERROR, WARNING, INFO, DEBUG)
  • adds time stamping
  • facilitates the use of the bug through the code (a.log.debug(), ...)
  • consolidates all client logs to 'serenade.log' to make easer understanding and cross-relating
  • debug log toggling is done by setting verbose on settings

A sample of the logs can be seen here: https://gist.github.com/sombrafam/9daf57e9ea86106499494b03b01dba2a

Test Plan

This change was tested manually. I compiled the changes, make sure that verbose was configured=true in the interface,
And checked 'serenade.log' to see if the new logging format was used. I have been using my local built version all morning without any problem with everything working fine.

Pre-Review Checklist

[ X ] I've performed a self-review of my own code
[ ] I've run the pre-commit hook to enforce code style (for some reason this is not triggering)
[ ] I've added or corresponding updated tests
[ ] I've run all tests and there were no failures
[ X] I've updated the documentation, if applicable

this.resolveStart = resolve;
this.stop();
const stream = fs.createWriteStream(path.join(this.settings.path(), "serenade.log"));
const stream = fs.createWriteStream(path.join(this.settings.path(), "custom-command-server.log"));
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed the name of this file to be something different from the default since this is logging for another process, and the messages would be mixed.

This commit adds  new framework for logging  across modules.
It allows amongst other things:

- several levels of logging  (ERROR, WARNING, INFO, DEBUG)
- adds time stamping
- facilitates the use of the bug through the code (a.log.debug(), ...)
- consolidates all client logs to 'serenade.log' to make easer
  understanding and cross-relating
- debug log toggling is done by setting verbose on settings
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