NeonGeckoCom / NeonCore

Neon Core extends Mycroft core with more modular code, extended multi-user support, and more.
Other
63 stars 44 forks source link

[FEAT] create a DEBUG on/off capability #690

Open Olzeke51 opened 3 months ago

Olzeke51 commented 3 months ago

Objective

Since DEBUG creates a lot of feedback, consuming 'log files' space [?10MB limit]; create a system-wide variable that can turn on & off a DEBUG flag for logging utils to use

Initial Implementation Requirements

these are what I could find , but couldn't determine how/where ~/.config/neon/neon.yaml fit into the picture:

(venv) neon@neon:~/venv/lib/python3.10/site-packages/neon_utils$ ls log*.py
log_utils.py  logger.py

Other Considerations

? having to check the flag for each entry into the file could slow it down, overflow a buffer/cache ?? every 10 secs in the skill log, bus log was 9+MB !!! {logs are archived in my BUG issue}

2024-06-08 05:13:40.371 - skills - ovos_bus_client.util.scheduler:check_state:186 - DEBUG - Call scheduled event: skill-ovos-homescreen.openvoiceos:skill-ovos-homescreen.openvoiceosupdate_dt
2024-06-08 05:13:50.390 - skills - ovos_bus_client.util.scheduler:check_state:186 - DEBUG - Call scheduled event: skill-ovos-homescreen.openvoiceos:skill-ovos-homescreen.openvoiceosupdate_dt
2024-06-08 05:14:00.411 - skills - ovos_bus_c
* * notice it cut-off in mid textr !
NeonDaniel commented 3 months ago

This is read from configuration currently (user values set in ~/.config/neon/neon.yaml by default). The configuration options are noted in ovos-utils which is where the LOG class is implemented