Skip to content

Latest commit

 

History

History
54 lines (36 loc) · 1.14 KB

Readme.md

File metadata and controls

54 lines (36 loc) · 1.14 KB

Loggly CLI

Loggly search command-line tool.

Installation

Quick install via go-get:

$ go get github.com/segmentio/go-loggly-cli
$ go-loggly-cli --version

Usage


  Usage: loggly [options] [query...]

  Options:

    --account <name>   account name
    --user <name>      account username
    --pass <word>      account password
    --size <count>     response event count [100]
    --from <time>      starting time [-24h]
    --to <time>        ending time [now]
    --json             output json array of events
    --count            output total event count

Setup

Loggly's search API requires basic auth credentials, so you must pass the --acount, --user, and --pass flags. To make this less annoying I suggest creating an alias:

alias logs='loggly --account segment --user tj --pass something'

This is a great place to stick personal defaults as well. Since flags are clobbered if defined multiple times you can define whatever defaults you'd like here, while still changing them via log:

alias logs='loggly --account segment --user tj --pass something --size 5'

License

MIT