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

Multiple Updates for logging #171

Merged
merged 6 commits into from
Mar 21, 2024
Merged

Conversation

andrew-welker
Copy link
Contributor

  • Modified map between old Debug levels (0, 1, 2) and Serilog LogEventLevels to more accurately reflect their usage
  • Updated the appdebug console command to allow for using either integers or the Serilog LogEventLevel strings.
  • Moved the CrestronLogger initialization and writing to a Serilog Sink and marked the ConsoleWithLog methods as obsolete
  • Updated the path for the Serilog file sink to write to a folder for the particular slot that's writing the log, along with changing the path depending on if it's an appliance or a VC-4 server. We may want to explore changing the path again, as the files may disappear if a room is removed
  • Updated the file sink to retain 30 days of log files at the Debug level on an appliance, and 60 days on a VC-4 server
  • Updated the format of messages logged to the file

Also add logic to allow using string like `Information` with `appdebug` console command.
`appdebug` command now takes levels as either integers 0-5 or Serilg `LogEventLevel` strings, `Information` etc.
@andrew-welker andrew-welker requested a review from ndorin March 21, 2024 15:20
@andrew-welker
Copy link
Contributor Author

For reference:

Serilog Level Old Essentials Level Serilog Integer value
Verbose 2 0
Debug 1 1
Information 0 2
Warning 3
Error 4
Fatal 5

@ndorin ndorin merged commit 985e7b9 into development-2 Mar 21, 2024
1 check passed
@ndorin ndorin deleted the feature-2/update-logging branch March 21, 2024 15:39
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.

2 participants