Skip to content

Commit 697c797

Browse files
authored
Add documentation about log level (#2108)
Add a few lines about log level configuration.
1 parent 61cd323 commit 697c797

File tree

2 files changed

+34
-0
lines changed

2 files changed

+34
-0
lines changed

docs/references.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,11 @@ bucket (unless they match a defined CIDR-block). Runtime configuration is the
9696
preferred method to control external IPs, and it overrides this variable.
9797
Default is disabled.
9898

99+
* `ROX_COLLECTOR_LOG_LEVEL`: Specifies which log level to use, if no logLevel
100+
is set in the Collector configuration. This is a convenience option: modifying
101+
Collector configuration might be cumbersome, and setting one environment
102+
variable is easier.
103+
99104
NOTE: Using environment variables is a preferred way of configuring Collector,
100105
so if you're adding a new configuration knob, keep this in mind.
101106

docs/troubleshooting.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,35 @@ following the instructions [here](https://docs.openshift.com/acs/configuration/g
5555
Within the downloaded bundle, the logs for all Collector pods will be available
5656
for inspection.
5757

58+
### Log level
59+
60+
Collector features several log levels:
61+
62+
* TRACE: The most verbose one, contains e.g. relocations for the eBPF program
63+
and processed events. Not recommended turning on in production due to large
64+
performance overhead.
65+
* DEBUG: Log information essential for debugging, reasonable to use without
66+
taking large performance overhead.
67+
* INFO: The default log level.
68+
* WARNING: Contains information about unexpected situations.
69+
* ERROR: Reports processing failures, without stopping Collector.
70+
* FATAL: Unrecoverable errors, duplicated to the termination log.
71+
72+
There are a few ways to configure log level in Collector, all are
73+
case-insensitive:
74+
75+
* Via environment variable `ROX_COLLECTOR_LOG_LEVEL`.
76+
77+
* In the Collector configuration via the `logLevel` key. This option takes
78+
precedence over the environment variable.
79+
80+
* Via API call `/loglevel`. This will enforce the log level value, regardless
81+
of existing configuration.
82+
83+
```
84+
$ curl -X POST -d "trace" collector:8080/loglevel
85+
```
86+
5887
### Pod Status
5988

6089
Another way of getting a quick look at the reason for a crashing Collector is to

0 commit comments

Comments
 (0)