Pumpkin-Docs/docs/de/config/logging.md
2026-07-24 13:05:39 +02:00

114 lines
1.4 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Logging
Pumpkin gibt dir Kontrolle darüber, was in die Logs geschrieben wird.
## Logging konfigurieren
#### `enabled`: Boolean
Ob Logging aktiviert ist oder nicht.
:::code-group
```toml [pumpkin.toml] {2}
[logging]
enabled = true
```
:::
#### `level`: Enum
Die Protokoll‑Verbalität (Log‑Level). Mögliche Werte:
- Off
- Error
- Warn
- Info
- Debug
- Trace
:::code-group
```toml [pumpkin.toml] {3}
[logging]
enabled = true
level = "Debug"
```
:::
#### `env`: Boolean
Ob das Log‑Level über die Umgebungsvariable `RUST_LOG` gesteuert werden kann.
:::code-group
```toml [pumpkin.toml] {3}
[logging]
enabled = true
env = true
```
:::
#### `threads`: Boolean
Ob Threads in Log‑Einträgen ausgegeben werden sollen.
:::code-group
```toml [pumpkin.toml] {3}
[logging]
enabled = true
threads = false
```
:::
#### `color`: Boolean
Ob die Konsolenausgabe farbig erfolgen soll.
:::code-group
```toml [pumpkin.toml] {3}
[logging]
enabled = true
color = false
```
:::
#### `timestamp`: Boolean
Ob ein Zeitstempel in den Log‑Nachrichten ausgegeben werden soll.
:::code-group
```toml [pumpkin.toml] {3}
[logging]
enabled = true
timestamp = false
```
:::
## Standardkonfiguration
Standardmäßig ist Logging auf `Info` gesetzt und gibt farbige Ausgaben inklusive Threads und Zeitstempel aus.
:::code-group
```toml [pumpkin.toml]
[logging]
enabled = true
level = "Info"
env = false
threads = true
color = true
timestamp = true
```
:::