-
Notifications
You must be signed in to change notification settings - Fork 107
Keep log messages from last full run and last run with error or warnings #2118
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
Conversation
…ith warnings or errors
|
@LKuemmel ich hab' Zeit gefunden meinen eigenen Wunsch zum Loghandling umzusetzen, bin immer wieder erstaunt was sich mit GitHub Copilot umsetzen lässt wenn man eine grobe Idee hat, aber das Detailwissen zu den Möglichkeiten fehlt. Es ist mir nicht gelungen die Handler für internal_chargepoint und smarthomehandler zu erkennen, bzw. herauszufinden ob & wo diese zyklisch gestartet werden. Sofern hier auch zyklisch gearbeitet wird kann ich dort noch die in-memory Logger initialisieren und speichern. |
|
Mit dem PR sind grundsätzlich auch weitere Szenarien denkbar, z.b. Logs nach dem letzten Ladestart/Stopp oder anderen Events welche ggf. weiter in der Vergangenheit liegen und sich daher nur schwer im Nachhinein analysieren lassen sofern das Problem nicht unmittelbar reproduzierbar ist. |
|
@LKuemmel kann ich Dich hier auch um ein Review bitten? Ist aus meiner Sicht inzwischen fertig und hat sich bei mir lokal bewährt. |
|
@LKuemmel Die Änderungen um die letzten drei Durchläufe aufzubewahren sind jetzt integriert. Den Merge-Konflikt beseitige ich auch gleich noch. |
…ngs (openWB#2118) * add in-memory log handler to capture latest log cycle and keep last with warnings or errors * specifcy log to be cleared and saved, add soc.log handling * skip writing to disk if there are no messages * keep last three logs, remove duplicate urllib logging * add warning/error
…ings (openWB#2118) * add in-memory log handler to capture latest log cycle and keep last with warnings or errors * specifcy log to be cleared and saved, add soc.log handling * skip writing to disk if there are no messages * keep last three logs, remove duplicate urllib logging * add warning/error
…ings (openWB#2118) * add in-memory log handler to capture latest log cycle and keep last with warnings or errors * specifcy log to be cleared and saved, add soc.log handling * skip writing to disk if there are no messages * keep last three logs, remove duplicate urllib logging * add warning/error
…ings (#2118) (#2657) * add in-memory log handler to capture latest log cycle and keep last with warnings or errors * specifcy log to be cleared and saved, add soc.log handling * skip writing to disk if there are no messages * keep last three logs, remove duplicate urllib logging * add warning/error
Adds in-memory log handler and attaches them to selected loggers. In-memory log handlers are flushed when 10s loop starts, all messages of that run are kept and written to *.latest.log. A *.latest-warning.log is generated in addition if any error or warning has been logged.
Scope of this PR:
Other logs like mqtt, chargelog or data_migration don't seem to benefit from this change.