...
This sample demonstrates how to process server logs (Tested for Carbon servers). Here we have used file input adaptor adapter and logger output adaptoradapter.
The query used in this sample is as follows: Here we are checking for warnings logs and emitting events based on that and print as a log info (and console).
...
First, after server restart go to the corresponding event builder and point the log file to correct location. Please note here server will only reads the tail logs, not full logs.
Then, if CEP detects any warn logs then it will emit events as shown below. (using logger event adaptoradapter)