logdog tool is a command-line LogDog Coordinator client.
logdog tool supports several subcommands. To see a list, run
logdog without any additional flags.
auth-login subcommand can be used to obtain authentication credentials. After running
auth-login successfully, subsequent accesses with the tool will use the cached authentication credentials.
You can log out using the
auth-logout subcommand, or check your authentication status with
cat subcommand allows a log stream to be viewed. If the log stream is still streaming,
logdog will block, showing new stream data as it becomes available.
$ logdog -project <project> cat <prefix>/+/<name>
The project may also be integrated into the log stream path. For example, the previous command is equivalent to:
$ logdog cat <project>/<prefix>/+/<name>
query subcommand allows queries to be executed against a Coordinator instance.
$ logdog query <params>...
-json parameter can be supplied to cause the query to produce detailed JSON output.
Several types of query constraints are supported. Note that these constraints are a subset of LogDog's full query API; consequently, support for additional query constraints may be added in the future.
Path queries identify log streams that match the supplied path constraint. Both the Prefix and Name components of the path can be specified either fully or globbed with
* characters according to some rules:
-path 'foo/bar'will return all log streams that have the prefix, “foo/bar”.
**will match all log streams that begin with a specified path.
**will match all log streams that end with a specified path.
-path 'foo/bar/**/+/**/stdoutwill find all streams that have “stdout” in their final name component and belong to a prefix beginning with “foo/bar”.
Queries can be limited by timestamp using the
-after flags. Timestamps are expressed as RFC 3339 time strings.
$ logdog query -after '1985-04-12T23:20:50.52Z'
Queries can be restricted to streams that match supplied tags using one or more
Tags are specified in one of two forms:
-tag <key>matches all streams that have the “” tag, regardless of its value.
-tag <key>=<value>matches all streams that have a “” tag with thed value, “”.
ls subcommand allows the user to navigate the log stream space as if it were a hierarchial directory structure.
To view project-level streams:
$ logdog ls myproject $ logdog ls myproject foo bar $ logdog ls myproject/foo + $ logdog ls myproject/foo/+ baz $ logdog ls myproject/foo/+/baz
-l flag may be supplied to cause metadata about each hierarchy component to be printed.