Skip to content

Commit c6b491a

Browse files
committed
Document Graylog logging configuration
1 parent ccb6cb0 commit c6b491a

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,25 @@ Additional logging output is available via `-v` verbose flags.
4848
| `-vv` |Debug|
4949
| `-vvv` |Trace|
5050
51+
### Graylog
52+
53+
Logs can be sent to a [Graylog][_graylog] instance using the `--graylog` flag:
54+
55+
```bash
56+
cargo run -- --graylog tcp://graylog.example.com:12201 serve
57+
```
58+
59+
The minimum log level sent to Graylog can be set independently of the stderr
60+
output level using `--logging-level` (default: `INFO`):
61+
62+
```bash
63+
cargo run -- --graylog tcp://graylog.example.com:12201 --logging-level WARN serve
64+
```
65+
66+
Both options can also be set via environment variables:
67+
- `NUMTRACKER_GRAYLOG` — Graylog URL
68+
- `NUMTRACKER_GRAYLOG_LOG_LEVEL` — log level (`TRACE`, `DEBUG`, `INFO`, `WARN`, `ERROR`)
69+
5170
## Schema
5271

5372
The schema is available via the `schema` command. This is also available via the
@@ -405,4 +424,5 @@ $ numtracker client visit-directory i22 cm12345-6
405424
```
406425

407426
[_graphiql]:https://github.com/graphql/graphiql/
427+
[_graylog]:https://graylog.org/
408428
[_jq]:https://jqlang.github.io/jq/

0 commit comments

Comments
 (0)