FHEM Forum

FHEM => English Corner => Thema gestartet von: jacko am 28 September 2022, 14:01:55

Titel: Adding entries to a logfile?
Beitrag von: jacko am 28 September 2022, 14:01:55
I have defined various filelogs to capture device events as they happen. However I would like to capture that status of some devices at the start of each day log.

Is there a generic way to add a log entry to match the device event entries?

So the logfile would look like this (with an initial daily entry and a later device event)
2022-09-28_00:00:01 DoorSensor off
...
2022-09-28_09:26:25 DoorSensor on


Thanks for any pointers.
Titel: Antw:Adding entries to a logfile?
Beitrag von: rudolfkoenig am 28 September 2022, 14:10:53
FileLogs are protocolling events.
One can generate arbitrary events with the trigger command.
Titel: Antw:Adding entries to a logfile?
Beitrag von: Beta-User am 28 September 2022, 14:15:27
Additionally - in case your request is wrt. to generation of "full" plots using SVG: You may have a look at logProxy (especially https://wiki.fhem.de/wiki/LogProxy#Erweitern_des_zu_plottenden_Bereichs_um_ausserhalb_liegende_Anfangs-_und_Endwerte)
Titel: Antw:Adding entries to a logfile?
Beitrag von: jacko am 29 September 2022, 09:00:30
The trigger cmd is exactly what I was looking for. And yes, it was in relation to an SVG graph so the pointer to the LogProxy command is appropriate, but I think I need some time to get my head around that.
Many thanks.