NeonGeckoCom / neon-os

Neon OS Releases
3 stars 1 forks source link

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

Open Olzeke51 opened 5 months ago

Olzeke51 commented 5 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 5 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