Are there any global variables available when the Log Monitor triggers an event? I'd like to get an e-mail if there's a "Z-Wave Error" in the log so I have a LogMatch set up to trigger my e-mail event based on the LogType, but I'd like to include the actual error in the LogText. Is this possible?
Announcement
Collapse
No announcement yet.
Log Monitor - available variables for e-mail
Collapse
X
-
Originally posted by windracer View PostAre there any global variables available when the Log Monitor triggers an event? I'd like to get an e-mail if there's a "Z-Wave Error" in the log so I have a LogMatch set up to trigger my e-mail event based on the LogType, but I'd like to include the actual error in the LogText. Is this possible?
Steve
-
Originally posted by SteveMSJ View PostNot currently but it’s a good idea and relatively easy to do so, stay tuned.
Steve
When a LogMatch is found the following Global Variables are updated before triggering the Event and/or Script. These Global Variables are all of type string.SHLogType
SHLogTypeEx – The LogType with matched characters highlighted
SHLogText
SHLogTextEx – The LogText with matched characters highlighted
SHLogFrom
SHLogDate
These can be used in emails, etc by using Replacement Variable $$GLOBALVAR:name: where name is the name of the Global Variable.
So, to display the text of the log message, with matching characters highlighted in red, use:
$$GLOBALVAR:SHLogTextEx:
Note – The Extended variables use html to highlight the text.
Steve
Comment
Comment