Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(169)

Side by Side Diff: logdog/client/cmd/logdog_cat/README.md

Issue 2183233002: Add LogDog project and component documentation. (Closed) Base URL: https://github.com/luci/luci-go@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « logdog/client/cmd/logdog_butler/README.md ('k') | logdog/server/README.md » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 LogDog Cat
2 ==========
3
4 LogDog `cat` is a command-line tool that is used to query and view LogDog log
5 streams. It interfaces with a **Coordinator** instance to perform these
6 operations.
7
8 ## Subcommands
9
10 The `logdog_cat` tool supports several subcommands.
11
12 ### cat
13
14 The `cat` subcommand allows a log stream to be viewed. If the log stream is
15 still streaming, `logdog_cat` will block, showing new stream data as it becomes
16 available.
17
18 ```shell
19 $ logdog_cat -project <project> cat <prefix>/+/<name>
20 ```
21
22 The project may also be integrated into the log stream path. For example, the
23 previous command is equivalent to:
24
25 ```shell
26 $ logdog_cat cat <project>/<prefix>/+/<name>
27 ```
28
29 ### query
30
31 The `query` subcommand allows queries to be executed against a **Coordinator**
32 instance.
33
34 ```shell
35 $ logdog_cat query <params>...
36 ```
37
38 The `-json` parameter can be supplied to cause the query to produce detailed
39 JSON output.
40
41 Several types of query constraints are supported. Note that these constraints
42 are a subset of LogDog's full query API; consequently, support for additional
43 query constraints may be added in the future.
44
45 #### Path
46
47 Path queries identify log streams that match the supplied path constraint.
48 Both the Prefix and Name components of the path can be specified either fully
49 or globbed with `*` characters according to some rules:
50
51 * Full prefix constraints will return log streams that share a Prefix
52 * For example `-path 'foo/bar'` will return all log streams that have the
53 prefix, "foo/bar".
54 * Single-component globbing.
55 * For example, `-path 'foo/*/baz'`.
56 * Right-open globbing via `**` will match all log streams that begin with a
57 specified path.
58 * For example, `-path 'foo/bar/**'`
59 * Left-open globbing via `**` will match all log streams that end with a
60 specified path.
61 * For example, `-path '**/baz'`
62 * Right-open and left-open globbing **cannot** be used in the same Prefix/Name.
63 * Globbing can be applied to both Prefix and Name.
64 * For example, `-path 'foo/bar/**/+/**/stdout` will find all streams that
65 have "stdout" in their final name component and belong to a prefix
66 beginning with "foo/bar".
67
68 #### Timestamps
69
70 Queries can be limited by timestamp using the `-before` and `-after` flags.
71 Timestamps are expressed as [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt)
72 time strings.
73
74 For example:
75 ```shell
76 $ logdog_cat query -after '1985-04-12T23:20:50.52Z'
77 ```
78
79 #### Tags
80
81 Queries can be restricted to streams that match supplied tags using one or
82 more `-tag` constraints.
83
84 Tags are specified in one of two forms:
85
86 * `-tag <key>` matches all streams that have the "<key>" tag, regardless of its
87 value.
88 * `-tag <key>=<value>` matches all streams that have a "<key>" tag with thed
89 value, "<value>".
90
91 ### ls
92
93 The `ls` subcommand allows the user to navigate the log stream space as if it
94 were a hierarchial directory structure.
95
96 To view project-level streams:
97
98 ```shell
99 $ logdog_cat ls
100 myproject
101
102 $ logdog_cat ls myproject
103 foo
104 bar
105
106 $ logdog_cat ls myproject/foo
107 +
108
109 $ logdog_cat ls myproject/foo/+
110 baz
111
112 $ logdog_cat ls myproject/foo/+/baz
113 ```
114
115 The `-l` flag may be supplied to cause metadata about each hierarchy component
116 to be printed.
OLDNEW
« no previous file with comments | « logdog/client/cmd/logdog_butler/README.md ('k') | logdog/server/README.md » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698