2024-01-08 11:28:31 +00:00
|
|
|
---
|
|
|
|
layout: page
|
|
|
|
title: How to configure logging
|
|
|
|
parent: How to ...
|
|
|
|
---
|
|
|
|
|
2023-11-07 18:50:23 +00:00
|
|
|
# How to configure logging
|
2023-02-23 10:55:06 +00:00
|
|
|
|
|
|
|
## Operator logging
|
|
|
|
|
|
|
|
### Log level
|
|
|
|
|
|
|
|
To adjust logging level of the operator, you can use `operator.args` in chart template value
|
2023-10-19 07:14:14 +00:00
|
|
|
as described in [Additional configuration](additional_configuration.md).
|
2023-02-23 10:55:06 +00:00
|
|
|
|
|
|
|
For example, to set log level to `INFO` and `DEBUG` for `requests` package, you can use the following value:
|
|
|
|
```yaml
|
|
|
|
operator:
|
|
|
|
args: ["--log.level=INFO", "--log.level=requests=DEBUG"]
|
|
|
|
```
|
|
|
|
|
|
|
|
### Log format
|
|
|
|
|
|
|
|
By default, operator logs in `pretty` format.
|
|
|
|
|
|
|
|
To switch logging format to the JSON, you can use `operator.args` in chart template value:
|
|
|
|
```yaml
|
|
|
|
operator:
|
2023-07-17 12:43:54 +00:00
|
|
|
args: ["--log.format=json"]
|
2023-02-23 10:55:06 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
## ArangoDeployment logging
|
|
|
|
|
|
|
|
By default, ArangoDeployment logs in `pretty` format.
|
|
|
|
|
|
|
|
To switch logging format to the JSON we need to pass `--log.use-json-format` argument to the ArangoDB server in the deployment:
|
|
|
|
```yaml
|
|
|
|
apiVersion: database.arangodb.com/v1
|
|
|
|
kind: ArangoDeployment
|
|
|
|
metadata:
|
|
|
|
name: single
|
|
|
|
spec:
|
|
|
|
mode: Single
|
|
|
|
single:
|
|
|
|
args:
|
|
|
|
- --log.use-json-format
|
|
|
|
- --log.level=INFO
|
|
|
|
- --log.level=backup=TRACE
|
|
|
|
```
|