Watches for new data in your log files and displays this data either via Notification Center
or Growl
.
Your log files don't need to exist when you start log-notifier
, it will automatically detect
and monitor new files provided they match the --file-pattern
option.
You can install log-notifier from Homebrew using:
$ brew tap nocturnalfrog/tap
$ brew install log-notifier
(Don't worry about the required dependencies, Homebrew will install them for you.) ###Required:
- fswatch is used for detecting new files.
- terminal-notifier is required to display notifications in
Notification Center
.
###Optional:
growlnotify
is required if you want the option for the notifications to be displayed byGrowl
(see the--growl
under options). You must install Growl on your own. You can learn more about Growl and see installation instructions at growl.info.
Usage: log-notifier [-h] [-g] [-p file_pattern] path_to_folder(s)
Options:
-h, --help Show this message.
-g, --growl Use Growl instead of Notification Center for notifications.
-p, --file-pattern Use a specific file pattern to monitor. (defaults to '*.log')
Receive notifications via Notification Center
when new lines are added to any files corresponding to the *.log
pattern in the specified folder:
$ log-notifier /path/to/log/folder/
Receive notifications via Growl
when new lines are added to the error.log
in the /path/to/log/folder/
folder:
$ log-notifier --growl --file-pattern "error.log" /path/to/log/folder/
Receive notifications via Growl
when new lines are added to *.log
files in any /path/to/vhosts/*/log/
folder:
$ log-notifier --growl /path/to/vhosts/*/log/
Included in the repo is a makefile that allows you to install/uninstall without Homebrew. (Please note that you will have to install the required dependencies manually.)
$ make install
$ make uninstall