@@ -51,7 +51,7 @@ server-side functionality is summarized entirely in its help message:
51
51
52
52
[ // ] : # ( run "make README.md" to update the next section with the output of tailon --help )
53
53
54
- [ // ] : # ( BEGIN HELP )
54
+ [ // ] : # ( BEGIN HELP_USAGE )
55
55
```
56
56
Usage: tailon -c <config file>
57
57
Usage: tailon [options] <filespec> [<filespec> ...]
@@ -98,7 +98,63 @@ Example usage:
98
98
99
99
See "--help-config" for configuration file usage.
100
100
```
101
- [ // ] : # ( END HELP )
101
+ [ // ] : # ( END HELP_USAGE )
102
+
103
+ [ // ] : # ( BEGIN HELP_CONFIG )
104
+ ```
105
+ The following options can be set through the config file:
106
+
107
+ # The <title> element of the of the webapp.
108
+ title = "Tailon file viewer"
109
+
110
+ # The root of the web application.
111
+ relative-root = "/"
112
+
113
+ # The addresses to listen on. Can be an address:port combination or an unix socket.
114
+ listen-addr = [":8080"]
115
+
116
+ # Allow downloading of known files (i.e those matched by a filespec).
117
+ allow-download = true
118
+
119
+ # Commands that will appear in the UI.
120
+ allow-commands = ["tail", "grep", "sed", "awk"]
121
+
122
+ # A table of commands that the backend can execute. This is best illustrated by
123
+ # the default configuration listed below.
124
+ [commands]
125
+
126
+ # File, glob and dir filespecs are similar in principle to their
127
+ # command-line counterparts.
128
+
129
+ At startup tailon loads the following default configuration:
130
+
131
+ title = "Tailon file viewer"
132
+ relative-root = "/"
133
+ listen-addr = [":8080"]
134
+ allow-download = true
135
+ allow-commands = ["tail", "grep", "sed", "awk"]
136
+
137
+ [commands]
138
+
139
+ [commands.tail]
140
+ action = ["tail", "-n", "$lines", "-F", "$path"]
141
+
142
+ [commands.grep]
143
+ stdin = "tail"
144
+ action = ["grep", "--text", "--line-buffered", "--color=never", "-e", "$script"]
145
+ default = ".*"
146
+
147
+ [commands.sed]
148
+ stdin = "tail"
149
+ action = ["sed", "-u", "-e", "$script"]
150
+ default = "s/.*/&/"
151
+
152
+ [commands.awk]
153
+ stdin = "tail"
154
+ action = ["awk", "--sandbox", "$script"]
155
+ default = "{print $0; fflush()}"
156
+ ```
157
+ [ // ] : # ( END HELP_CONFIG )
102
158
103
159
## Security
104
160
@@ -140,7 +196,7 @@ go build -tags dev
140
196
```
141
197
142
198
This will ensure that the ` tailon ` binary is reading assets from the
143
- ` frontend/dist ` directory instead of from ` frontend/assets_vfsdata.go ` .
199
+ ` frontend/dist ` directory instead of from ` frontend/assets_vfsdata.go ` .
144
200
To compile the web assets, use ` make all ` in ` frontend ` .
145
201
146
202
The ` make watch ` goal can be used to continuously update the bundles as you
0 commit comments