cf-app-logstail

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

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

Go to latest
Published: Jul 16, 2014 License: MIT Imports: 5 Imported by: 0

README

Cloud Foundry Application Logs Tailer

The cf-app-logstail binary is used for tailing logfiles written by applications which do not satisfy the 12-factor logging to STDOUT/STDERR principle. This can be of help while applications are being re-written or for legacy applications to which you cannot change the code.

Instructions

First set an environment variable in your application's space specifying what logs to tail into loggregator.

For example, to send log/production.log to STDOUT (the default) while sending log/error.log to STDERR we would do the following:

cf set-env #app_name logstail "log/production.log:log/error.log|2"

Next add cf-logstail to start with the application so that it logs it's STDOUT/STDERR to the same streams as the application (eg. loggregator).

TODO: Figure out the best way to do this.

Push your application / ensure that it restarts to get the new environment variables and the new binary:

cf push #app_name

Check to make sure the logs are being tailed:

cf logs #app_name

Hat-Tip

Thanks to ActiveState for writing their tail library

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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