This binding reads and analyzes log files. Search patterns are fully configurable, therefore different kind of log files should be possible to monitor by this binding.
When certain log events are recognized, openHAB rules can be used to send notification about the event e.g by email for further analysis.
## Supported Things
This binding supports one ThingType: `reader`.
A reader supports 3 separate channels
* One for errors
* one for warnings
* one custom channel for other purposes.
## Thing Configuration
The `reader` Thing has the following configuration parameters:
| Parameter | Type | Required | Default if omitted | Description |
| `lastErrorEvent` | `String` | Displays content of last [ERROR] event |
| `lastWarningEvent` | `String` | Displays content of last [WARN] event |
| `lastCustomEvent` | `String` | Displays content of last [CUSTOM] event |
| `errorEvents` | `Number` | Displays number of [ERROR] lines matched to search pattern |
| `warningEvents` | `Number` | Displays number of [WARN] lines matched to search pattern |
| `customEvents` | `Number` | Displays number of [CUSTOM] lines matched to search pattern |
| `logRotated` | `DateTime` | Last time when log rotated recognized |
| `newErrorEvent` | - | Trigger channel for last [ERROR] line |
| `newWarningEvent` | - | Trigger channel for last [WARN] line |
| `newCustomEvent` | - | Trigger channel for last [CUSTOM] line |
## Examples
### example.things
```xtend
logreader:reader:openhablog[ refreshRate=1000, errorPatterns="ERROR+", errorBlacklistingPatterns="annoying error which should be ignored|Another annoying error which should be ignored" ]
val telegramAction = getActions("telegram","telegram:telegramBot:myBot")
telegramAction.sendTelegram("*ERROR* LogReader Event!\n%s Errors are in the log! Here is the last row of it:\n`%s`", logreaderErrors.state.toString, logreaderLastError.state.toString)