[WIP]
File log watcher. Search for needle/occurrence, sending email notification when found.
Usage:
$ export USER=<EMAIL>
$ export PASSWD=<PASSWORD>
$ go run main.go <LOG_PATH> <RECIPIENT> <NEEDLE>
# example:
# zreq3b@SF314-59 (master)$ go run main.go /home/zreq3b/go/src/github.com/zreq3b/gowatcha/assets/demo.txt [email protected] 123
Starting...
__________ _ _____ ______________ _____
/ ____/ __ \ | / / |/_ __/ ____/ / / / |
/ / __/ / / / | /| / / /| | / / / / / /_/ / /| |
/ /_/ / /_/ /| |/ |/ / ___ |/ / / /___/ __ / ___ |
\____/\____/ |__/|__/_/ |_/_/ \____/_/ /_/_/ |_|
===================================================
Parameters:
- LOG_PATH: absolute path to log file
- RECIPIENT: is the email to notify
- NEEDLE: the string occurrence we have to search
#TODO:
- handle parameters
- handle configuration settings