docs(sh-manage): add logging to production setup (#5800)

* docs(sh-manage): add logging to production setup

* Update docs/docs/self-hosting/manage/production.md

Co-authored-by: Florian Forster <florian@zitadel.com>

* add suggestion from review

---------

Co-authored-by: Florian Forster <florian@zitadel.com>
This commit is contained in:
mffap 2023-05-04 14:37:01 +02:00 committed by GitHub
parent f1534c0c4c
commit 9c3f149cd7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -45,6 +45,22 @@ Tracing:
MetricPrefix: zitadel MetricPrefix: zitadel
``` ```
## Logging
ZITADEL follows the principles that guide cloud-native and twelve factor applications.
Logs are a stream of time-ordered events collected from all running processes.
ZITADEL processes write the following events to the standard output:
- Runtime Logs: Define the log level and record format [in the Log configuration section](https://github.com/zitadel/zitadel/blob/main/cmd/defaults.yaml#L1-L4)
- Access Logs: Enable logging all HTTP and gRPC responses from the ZITADEL binary [in the LogStore section](https://github.com/zitadel/zitadel/blob/main/cmd/defaults.yaml#L366)
- Actions Exectution Logs: Actions can emit custom logs at different levels. For example, a log record can be emitted each time a user is created or authenticated. If you don't want to have these logs in STDOUT, you can disable this [in the LogStore section](https://github.com/zitadel/zitadel/blob/main/cmd/defaults.yaml#L387) .
Log file management should not be in each business apps responsibility.
Instead, your execution environment should provide tooling for managing logs in a generic way.
This includes tasks like rotating files, routing, collecting, archiving and cleaning-up.
For example, systemd has journald and kubernetes has fluentd and fluentbit.
## Database ## Database
### Prefer CockroachDB ### Prefer CockroachDB