FHEM > English Corner

Adding entries to a logfile?


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)

--- Code: ---2022-09-28_00:00:01 DoorSensor off
2022-09-28_09:26:25 DoorSensor on

--- Ende Code ---

Thanks for any pointers.

FileLogs are protocolling events.
One can generate arbitrary events with the trigger command.

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)

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.


[0] Themen-Index

Zur normalen Ansicht wechseln