Ich habe folgende Filelog-Definition:
Internals:
DEF ./log/Bad.Wandthermostat-%Y-%m.log Bad.Wandthermostat.batteryLevel|Bad.Wandthermostat_Climate:.*
NAME FileLog_Bad.Wandthermostat
NR 203
NTFY_ORDER 50-FileLog_Bad.Wandthermostat
REGEXP Bad.Wandthermostat.batteryLevel|Bad.Wandthermostat_Climate:.*
STATE active
TYPE FileLog
currentlogfile ./log/Bad.Wandthermostat-2016-08.log
logfile ./log/Bad.Wandthermostat-%Y-%m.log
Attributes:
archivedir ./log-archivedir/
logtype text
nrarchive 1
room Logs
Im dazugehörenden Textfile stehen aber auch die Werte vom OG.Bad.Wandthermostat
2016-08-03_09:04:34 Bad.Wandthermostat_Climate desired-temp: on
2016-08-03_09:04:34 Bad.Wandthermostat_Climate humidity: 69
2016-08-03_09:04:34 Bad.Wandthermostat_Climate measured-temp: 23.2
2016-08-03_09:04:34 Bad.Wandthermostat_Climate T: 23.2 desired: on
2016-08-03_09:05:19 OG.Bad.Wandthermostat_Climate desired-temp: on
2016-08-03_09:05:19 OG.Bad.Wandthermostat_Climate humidity: 65
2016-08-03_09:05:19 OG.Bad.Wandthermostat_Climate measured-temp: 22.6
2016-08-03_09:05:19 OG.Bad.Wandthermostat_Climate T: 22.6 desired: on
2016-08-03_09:06:45 Bad.Wandthermostat_Climate desired-temp: on
2016-08-03_09:06:45 Bad.Wandthermostat_Climate humidity: 69
2016-08-03_09:06:45 Bad.Wandthermostat_Climate measured-temp: 23.2
2016-08-03_09:06:45 Bad.Wandthermostat_Climate T: 23.2 desired: on
2016-08-03_09:07:43 OG.Bad.Wandthermostat_Climate desired-temp: on
2016-08-03_09:07:43 OG.Bad.Wandthermostat_Climate humidity: 65
2016-08-03_09:07:43 OG.Bad.Wandthermostat_Climate measured-temp: 22.6
2016-08-03_09:07:43 OG.Bad.Wandthermostat_Climate T: 22.6 desired: on
Das RegExp ist aber doch so definiert, dass die Werte vom OG da nicht enthalten sein dürften.
Das Filelog für OG.Bad.Wandthermostat dagegen funktioniert einwandfrei.
Wo ist mein Fehler?
Holger
Versuche mal ^Bad.Wandthermostat.batteryLevel|^Bad.Wandthermostat_Climate:.*
als Regex
Danke dir. Das hat geholfen, die Werte vom OG auszublenden.
Ich verstehe den Sinn des ^ - und es hilft ja
aber eigentlich hätten m.E. die Werte vom OG nicht mit geloggt werden dürfen (der Regex beginnt ja nicht mit einem Wildcard). Ansonsten müsste ich vorsichtshalber alle Logs diesbezüglich anpassen.
aber eigentlich hätten m.E. die Werte vom OG nicht mit geloggt werden dürfen
Ja, das habe ich bisher auch gedacht.