sauron

command module
v0.0.0-...-d6986db Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 5, 2015 License: MIT Imports: 4 Imported by: 0

README

sauron GoDoc

CLI tool for tail-ing a whole log directory recursively and dynamically

wercker status

What and why?

tail is really nice for monitoring logs. It also works recursively: tail -f **/*.log, which means you can use it to monitor a directory of logs. However, I couldn't find a simple command for doing this and automatically following new files.

Sauron is a tool that allows you to do exactly that. Run it in a directory and it will essentially output the result of calling tail -f on every single file within the directory (even ones created after the command is ran).

Sauron is also a library, so you can extend the functionality to push logs to an external service or database.

Can I haz?

Yes,

# Tap
brew tap etcinit/homebrew-etcinit

# Install
brew install sauron

# Get usage info
sauron help

or if you have GOPATH setup:

# Get the package
go get github.com/etcinit/sauron

# Get usage info (make sure $GOPATH/bin is in your $PATH)
sauron help

Future ideas:

  • Filter by regex
  • Integrated support for sinks (InfluxDB, ElasticSearch, MySQL, syslogd)
  • Better error reporting

Feel free to open a PR if you have something you would like to add

Documentation

Overview

Package Sauron provides tools for monitoring changes on existing and new files inside a directory.

After installation, the CLI tool should be available as:

sauron

Running the command without any parameters will cause sauron to watch the current directory for changes. Any new lines appended to any files will be printed out.

It is possible to specify which directory to watch:

sauron /var/log/hhvm

For more detailed output, use the verbose option:

sauron --verbose /var/log/nginx

Most of the code for this tool is available as a standalone package, checkout the https://github.com/etcinit/sauron/tree/master/eye package.

Directories

Path Synopsis
Package console contains Sauron's CLI commands.
Package console contains Sauron's CLI commands.
Package eye provides the internals behind the Sauron CLI tool.
Package eye provides the internals behind the Sauron CLI tool.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL