-
-
Notifications
You must be signed in to change notification settings - Fork 39
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
Improve logging #155
Improve logging #155
Conversation
Add sending to telegram back (not optimal ATM, creates too many strings) Remove config file logging to not expose secrets Merge with develop # Conflicts: # .gitignore # include/BLE_Common.h # include/Builtin_Pages.h # include/Main.h # include/SmartSpin_parameters.h # include/sensors/CyclePowerData.h # include/sensors/FitnessMachineIndoorBikeData.h # include/sensors/HeartRateData.h # include/sensors/SensorDataFactory.h # include/settings.h # platformio.ini # src/BLE_Client.cpp # src/BLE_Common.cpp # src/BLE_Server.cpp # src/BLE_Setup.cpp # src/HTTP_Server_Basic.cpp # src/Main.cpp # src/SmartSpin_parameters.cpp # src/sensors/FitnessMachineIndoorBikeData.cpp # src/sensors/SensorDataFactory.cpp
Fix display of debug logs
I'm guessing you couldn't find a good precompiler based solution instead of writing the filename in every SS2K_LOG() call? I see a possible way of doing it but it looks like it's runtime, so yuck... https://stackoverflow.com/questions/8487986/file-macro-shows-full-path |
Got through a bunch of it tonight. I'll continue in the morning. One concern - is there a switch for logging to Spiffs? It's probably pretty crappy flash memory and might wear out if we do a lot of writes. Also, I don't know yet if you have any space checking before you append to the file (don't want to fill up spiffs). Another thing I just thought of, if the file gets very large, I read somewhere that spiffs write appends can get very slow (like tens of seconds) if the file gets more than a few kb in size. |
@doudar I’m not logging to SPIFFS and didn’t plan to support that. |
# Conflicts: # CHANGELOG.md # src/BLE_Server.cpp
# Conflicts: # .gitignore # CHANGELOG.md
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like there's a crash when a shift happens.
Any updates? |
# Conflicts: # src/BLE_Server.cpp
# Conflicts: # src/BLE_Common.cpp # src/SmartSpin_parameters.cpp
Fix calls to pio docker container
# Conflicts: # .github/workflows/pre-commit.yml # .pre-commit-config.yaml # CHANGELOG.md # lib/SS2K/include/sensors/CyclePowerData.h # lib/SS2K/src/sensors/FitnessMachineIndoorBikeData.cpp # lib/SS2K/src/sensors/SensorDataFactory.cpp # platformio.ini # src/BLE_Common.cpp # src/HTTP_Server_Basic.cpp
Progress 👍 I'm studying tonight - review will happen tomorrow. Have you done any ride testing yet? |
Lgtm |
@kadaan Make sure to restore this branch (it's in your repo so I can't). I obviously love the output but I didn't pay attention previously to the lengthy process involved to generate logging in the BLE_Server code. It would be too laborious and obscure to insert the proposed logging into every case statement for the soon to be incoming FTMS_Server-fillout as well as future changes. We need to get
Shortened to:
Please let me know where I can help, but this one is a pretty complex problem (for me). |
Improve logging
Add sending to telegram back (not optimal ATM, creates too many strings)
Remove config file logging to not expose secrets
Merge with develop