1
0
Fork 0
mirror of https://github.com/arangodb/kube-arangodb.git synced 2024-12-14 11:57:37 +00:00
kube-arangodb/docs/how-to/logging.md

50 lines
1.1 KiB
Markdown
Raw Permalink Normal View History

---
layout: page
title: How to configure logging
parent: How to ...
---
# How to configure logging
## Operator logging
### Log level
To adjust logging level of the operator, you can use `operator.args` in chart template value
as described in [Additional configuration](additional_configuration.md).
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:
args: ["--log.format=json"]
```
## 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
```