logging
This commit is contained in:
@@ -39,7 +39,7 @@ The maximum size of a single file is configured with `UPLOAD_MAX_SIZE_MB` w `.en
|
||||
|
||||
## Wybór bazy danych
|
||||
|
||||
RustPad wybiera silnik na podstawie `DATABASE_URL`:
|
||||
RustPad use db engine via `DATABASE_URL`:
|
||||
|
||||
- SQLite: `sqlite:///data/db/rustpad.db?mode=rwc&journal_mode=WAL&busy_timeout=5000`
|
||||
- PostgreSQL: `postgres://rustpad:rustpad@postgres:5432/rustpad`
|
||||
@@ -47,7 +47,7 @@ RustPad wybiera silnik na podstawie `DATABASE_URL`:
|
||||
|
||||
SQLite pozostaje domyślną bazą dla developmentu i małych instalacji. Tryb WAL pozwala czytać podczas zapisu, ale SQLite nadal wykonuje tylko jeden zapis naraz. `busy_timeout=5000` powoduje krótkie oczekiwanie zamiast natychmiastowego błędu `database is locked`. Przy wielu równoczesnych edytorach lub wielu instancjach aplikacji zalecany jest PostgreSQL albo MySQL.
|
||||
|
||||
Opcjonalne bazy w Docker Compose:
|
||||
Opcjonalne db inDocker Compose:
|
||||
|
||||
```bash
|
||||
# PostgreSQL
|
||||
@@ -70,3 +70,15 @@ Nicknames can still be used anonymously while they remain unregistered. Register
|
||||
|
||||
All runtime SQL statements are centralized in `src/queries.rs`. Backend modules reference named constants, which keeps database-specific debugging and query review in one place.
|
||||
|
||||
|
||||
## Diagnostics and logging
|
||||
|
||||
Server logs use `tracing`. Configure verbosity with `RUST_LOG`, for example:
|
||||
|
||||
```env
|
||||
RUST_LOG=rustpad=debug,tower_http=info
|
||||
```
|
||||
|
||||
Important lifecycle, database, authentication, password-reset and WebSocket events are logged. Passwords, session tokens, reset tokens, SMTP credentials and authorization headers are never logged.
|
||||
|
||||
Browser diagnostics are configured separately from backend logs with `FRONTEND_LOG_LEVEL`. Supported values are `off`, `error`, `warn`, `info`, and `debug`; the default is `warn`. URL parameters cannot enable diagnostics. Use `debug` only in trusted development environments. Production should normally use `warn` or `error`.
|
||||
|
||||
Reference in New Issue
Block a user