-
Notifications
You must be signed in to change notification settings - Fork 32
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
Add configurable log levels #123
Comments
PS: there was earlier development on the configurator to allow exporting of package logs via the UI: fpv-wtf/wtfos-configurator#106 It was not shipped however. |
no disk space usage issues to worry about i presume; we have enough headroom there that it should be ok ? I think as a start.... new log function and then sprinkle logging calls around all the init / negotiation type stuff |
I have 2GB free on my V2 Goggles blackbox, so yeah, it should entirely be fine. We'll need to add logrotate or something similar for sure, otherwise eventually it'll still blow up. And definitely lets not default to any per frame logging (except maybe fatal errors I spose). I'll take it upon myself to have logrotate available in the repo for a dep soon. Makes sense to have all toasts logged, but I'd leave it to the maintainers to discuss how this makes sense. i.e. replace toast calls with logging calls with a flag to also show a toast, or have the toast function also call the log function. I imagine we might want to dump more data to the log than necessarily show in the UI. |
Actually, I wonder if it'd make sense to use the android log functions and DJI-s existing blackbox logger to write to disk and take care of rotation etc. I'll look into it shortly, my main concern is being able to distinguish msp-osd logs from general glasses logs in a clean way. The upside would be the abilty to use existing adb logcat tools during dev. Including: https://yume-chan.github.io/ya-webadb/logcat |
In order to help debugging user issues like osd recording not working or canvas size negotiation failing we should add configurable debug levels to msp-osd.
I imagine we want at least two levels (+ disabled) because anything that fires once per frame should probably be it's own level.
Ideally with a separate log file in /opt/var/log/msp-osd/msp-osd.log but we can also deal with printf via dmesg output worst case. We can add a dependency for logrotate (once added to the mirror repo) and a config file to make sure it never gets out of hand.
Specifically I'm trying to find out why kelso88#0828 from Discord can't get osd to record, even though the setup appears valid otherwise.
The text was updated successfully, but these errors were encountered: