Replace ad-hoc console output with a structured logger (pretty/JSON, levels, redaction, optional file rotation), a clean startup banner with Docker/feature probes, graceful shutdown signals, and slow-RPC warnings.
This commit is contained in:
@@ -67,6 +67,27 @@ Vault file: `peardock-vault.json` (mode 600). Override path with `PEARDOCK_VAULT
|
||||
| `PEARDOCK_UNRESTRICTED_CLI=1` | Broader `docker` CLI for **admin** |
|
||||
| `PEARDOCK_BROWSE_OPEN=1` | Legacy open host FS browse (discouraged) |
|
||||
|
||||
## Logging
|
||||
|
||||
| Env | Effect |
|
||||
|-----|--------|
|
||||
| `LOG_LEVEL` | `error` · `warn` · `info` (default in production) · `debug` (default in dev) |
|
||||
| `LOG_FORMAT` | `pretty` (TTY default) · `json` (default when non-TTY / good for journald) |
|
||||
| `ENABLE_FILE_LOGGING=1` | Append JSON lines under `LOG_DIR` (default `./logs`) with size rotation |
|
||||
| `LOG_DIR` | Directory for file logs |
|
||||
| `NO_COLOR=1` | Disable ANSI colors in pretty mode |
|
||||
| `LOG_STACK=1` | Include error stacks in structured fields |
|
||||
|
||||
Examples:
|
||||
|
||||
```bash
|
||||
# systemd / journald
|
||||
LOG_FORMAT=json LOG_LEVEL=info npm run server
|
||||
|
||||
# local development
|
||||
LOG_LEVEL=debug npm run server
|
||||
```
|
||||
|
||||
## Compose stacks
|
||||
|
||||
`deployStack` accepts:
|
||||
|
||||
Reference in New Issue
Block a user