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

Move superfluous logs to new log level #1237

Open
4 tasks
ne-bbahn opened this issue Jan 7, 2025 · 0 comments
Open
4 tasks

Move superfluous logs to new log level #1237

ne-bbahn opened this issue Jan 7, 2025 · 0 comments

Comments

@ne-bbahn
Copy link
Contributor

ne-bbahn commented Jan 7, 2025

Logs seem to be a bit excessive in unneeded details that are unlikely to be useful. This leads to a rather large excess of logs being generated, when they could be cut down to ~2/3 the log output that is currently being generated without losing almost any useful information.
For this reason, I propose moving things such as Next run set to be at [unix_timestamp] and run() - loop -running to a new deeper log level using logging.addLevelName and removing these from debug and add them to a new level full_debug. This is especially egregious in the passive logs where every second, NCPA states that it is initializing your checks regardless of how long a sleep interval you have set for your passive checks. The passive process also shouldn't be refreshing your checks every second unless you've set your checks to run every second...

Consideration: Perhaps instead of adding full_debug and moving logs out of debug, it may be preferable to add a light_debug between debug and info. This would reduce the risk of harming anyone expecting the current log output, but so long as the only things moved would be the superfluous information, I think the original plan of moving them to full_debug will save existing users disk space without harming their log usage. If anyone has any opinions contrary to this, please mention them in a response here.

Tasks involved:

  • Add new log level in ncpa.py
  • Update Windows graphical installation to mention full_debug
  • Update ncpa.cfg default text to mention full_debug
  • Go through the instances of .debug() and move the superfluous ones to full_debug
@ne-bbahn ne-bbahn changed the title New log level Move superfluous logs to new log level Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant