The first thing users should do is download the
current commandline tool. It can provide access to logs, send data from files in, and assist with setting up log sources.
At present, there are 3 versions of the tool for popular platforms. If we’re missing your platform, please let us know so we can correct the issue: firstname.lastname@example.org.
There are 2 ways to get the current.sh CLI tool:
- Download it from equinox.io
current updatefrom within your existing version. (Some users may have an older version without
update. Please download a new one from equinox.io).
current login will log you into current.sh using your Github credentials. This works by using a temporary token so that all your credentials stay on your machine and are never shared with current.sh.
current streams provides a listing of all the streams that you have access to.
current default sets a default stream to be used when one isn’t specified but required with other commands such as
current heroku assists in configuring a heroku app to send its logs to current.sh. More information is available in the Heroku docs section.
current search allows you to search and view your logs. For example:
current search -n widgets will show the latest logs for the
current send can be used to log new data into an stream. There are various options to make this option fairly flexible:
-n <stream name>: This will cause the data to be sent to the named stream. This option requires
currentto be logged in so it can query the user’s streams.
-t <token>: This will have the data sent to the stream associated with the given token. Tokens are consider shared secrets and thusly do not require
currentto be logged in. Tokens for streams can be viewed with
-u <url>: This will override all other decisions about how and where to send the data and instead post the data to url as LogShuttle formatted data.
-umust be specified
-s <name>: This gives a name to the current usage of current so it can use that name to store any file offset data. The idea is to use the same name for the same files, allowing current to track the offset information in its data directory.
--db <path>: This gives an explicit path to use to store the file offset database.
- If neither
--dbare specified, a session is calculated given the files being watched.
--tag key:val: This allows you to apply a tag to every log entry sent and can be specified multiple times to create multiple tags. A common usage of this is to tag the environment of logs, for instance
current send --tag environment:production logs/production.log.
There are 2 ways that
send can get data:
- From standard input. If no arguments are passed,
sendwill read standard input one line at a time as log entries. This allows you to pipe data to
sendeasily and integrate it with more exotic setups.
- From a series of files. Any arguments passed to send that aren’t options are interpreted as paths to files. Send will read files one line at a time as log entries and send them up. This is where the
-soptions come into play.
sendautomatically tracks how much data it’s read out of each file so if it’s restarted it doesn’t send data that has already been read.
current setup-docker is used to configure a docker installation to send logs to current.sh.
By default, it simply prints out the command to configure docker. If
-e is passed, it will run the commands as well.
This works by running an image called
current/autologs that gathers up the logs from all other containers and ships them up to current.sh.
Containers can opt-out of shipping their logs by setting any of the following:
- A label of
- An environment variable
- An environment variable
The last one there is allowed for users that are already using logpsout.