Skip to content

Log rewrite#107

Merged
infeeeee merged 13 commits intorichibrics:mainfrom
infeeeee:log-rewrite
May 18, 2024
Merged

Log rewrite#107
infeeeee merged 13 commits intorichibrics:mainfrom
infeeeee:log-rewrite

Conversation

@infeeeee
Copy link
Copy Markdown
Collaborator

@infeeeee infeeeee commented May 4, 2024

Final part of #90

  • Full rewrite of logging using the standard logging library, different log format for file and and console logging. Log levels follow standard conventions.
  • Log rotation: only the last 5 files remains, older files automatically deleted
  • Log settings in the configurator menu:
    • Console log level
    • If Console log should include time. Reason for this, if IoTuring is run as a service, the system log already adds a timestamp.
    • File log level
    • Enable/disable file log
    • Change the log dir
  • Settings are loaded twice with ConfiguratorLoader, this way logging can start before Configurator menu opened. File logging does not start before configuration loaded, early messages saved to a buffer, and saved to file only if file logging is enabled.
  • Terminal related functions collected in TerminalDetection.py

It's working, but it's possible that there are some bugs.

Fell free to edit if you have some better ideas.

resolves #58

@infeeeee infeeeee mentioned this pull request May 10, 2024
@infeeeee infeeeee marked this pull request as ready for review May 10, 2024 12:53
@infeeeee infeeeee requested a review from richibrics May 10, 2024 12:53
@infeeeee infeeeee mentioned this pull request May 10, 2024
5 tasks
@richibrics
Copy link
Copy Markdown
Owner

Finally we're using logging :) Also great work with the settings for the log. Thank you so much

@infeeeee infeeeee merged commit 80777d4 into richibrics:main May 18, 2024
@infeeeee infeeeee deleted the log-rewrite branch May 18, 2024 09:52
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.

Change folder for Logs like we did for configurations

2 participants