Open
Conversation
sombrafam
commented
Sep 10, 2024
| 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")); |
Author
There was a problem hiding this comment.
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
ec1154d to
44ca309
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Approved Issue:
Description
This commit adds new framework for logging across modules. It allows amongst other things:
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