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
20
dist/INSTALL.md
vendored
20
dist/INSTALL.md
vendored
|
|
@ -104,7 +104,6 @@ Edit `/etc/pollux/config.toml`:
|
|||
bind_host = "0.0.0.0"
|
||||
port = 1965
|
||||
max_concurrent_requests = 1000
|
||||
log_level = "info"
|
||||
|
||||
# Host configuration
|
||||
["example.com"]
|
||||
|
|
@ -113,6 +112,22 @@ cert = "/etc/pollux/tls/cert.pem"
|
|||
key = "/etc/pollux/tls/key.pem"
|
||||
```
|
||||
|
||||
### Logging Configuration
|
||||
|
||||
Pollux uses structured logging with the `tracing` crate. Configure log levels using the `RUST_LOG` environment variable:
|
||||
|
||||
```bash
|
||||
# Set log level before starting the service
|
||||
export RUST_LOG=info
|
||||
sudo systemctl start pollux
|
||||
|
||||
# Or for debugging
|
||||
export RUST_LOG=pollux=debug
|
||||
sudo systemctl restart pollux
|
||||
|
||||
# Available levels: error, warn, info, debug, trace
|
||||
```
|
||||
|
||||
### Content Setup
|
||||
|
||||
```bash
|
||||
|
|
@ -194,7 +209,8 @@ See `config.toml` for all available options. Key settings:
|
|||
- `bind_host`: IP/interface to bind to (global)
|
||||
- `port`: Listen port (1965 is standard, per host override possible)
|
||||
- `max_concurrent_requests`: Connection limit (global)
|
||||
- `log_level`: Logging verbosity (global, per host override possible)
|
||||
|
||||
Logging is configured via the `RUST_LOG` environment variable (see Logging Configuration section).
|
||||
|
||||
## Certificate Management
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue