Replace custom logging with tracing crate and RUST_LOG env var
- Remove custom logging module and init_logging function - Update main.rs to use tracing_subscriber with EnvFilter - Remove log_level from global config structure - Update documentation and tests to use RUST_LOG - Format long lines in config.rs and test files for better readability
This commit is contained in:
parent
50a4d9bc75
commit
55fe47b172
15 changed files with 787 additions and 459 deletions
19
README.md
19
README.md
|
|
@ -115,9 +115,26 @@ Access with a Gemini client like Lagrange at `gemini://yourdomain.com/`.
|
|||
## Options
|
||||
|
||||
- `--config` (`-C`): Path to config file (default `/etc/pollux/config.toml`)
|
||||
- `--no-tls`: Disable TLS for testing (uses raw TCP connections)
|
||||
- `--test-processing-delay` (debug builds only): Add delay before processing requests (seconds) - for testing rate limiting
|
||||
|
||||
## Logging
|
||||
|
||||
Pollux uses the `tracing` crate for structured logging. Configure log levels with the `RUST_LOG` environment variable:
|
||||
|
||||
```bash
|
||||
# Basic usage
|
||||
export RUST_LOG=info
|
||||
./pollux
|
||||
|
||||
# Module-specific levels
|
||||
export RUST_LOG=pollux=debug,sqlx=info
|
||||
|
||||
# Maximum verbosity
|
||||
export RUST_LOG=trace
|
||||
```
|
||||
|
||||
Available levels: `error`, `warn`, `info`, `debug`, `trace`
|
||||
|
||||
## Security
|
||||
|
||||
Pollux is designed with security as a priority:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue