fix: log targets in image defaults and docs
This commit is contained in:
@@ -46,10 +46,11 @@ ALLOW_REGISTRATION=true
|
|||||||
# RATE_LIMIT=60
|
# RATE_LIMIT=60
|
||||||
# SECURE_COOKIES=true
|
# SECURE_COOKIES=true
|
||||||
# Handler-level logs come from the `http_axum` crate; startup/wiring logs come
|
# Handler-level logs come from the `http_axum` crate; startup/wiring logs come
|
||||||
# from `server`. Include both — `server=info` alone silently drops handler logs.
|
# from `bootstrap`; config-load logs come from `config`. Include all three —
|
||||||
|
# `server=info` alone silently drops them.
|
||||||
# Crates not named here (adapters, etc.) still log warnings and errors unless
|
# Crates not named here (adapters, etc.) still log warnings and errors unless
|
||||||
# you set a bare level yourself (e.g. `info,http_axum=debug`).
|
# you set a bare level yourself (e.g. `info,http_axum=debug`).
|
||||||
# RUST_LOG=server=info,http_axum=info,tower_http=info,worker=info
|
# RUST_LOG=server=info,worker=info,bootstrap=info,config=info,http_axum=info,tower_http=info
|
||||||
|
|
||||||
# CORS (for SPA development only)
|
# CORS (for SPA development only)
|
||||||
# CORS_ORIGINS=http://localhost:5173
|
# CORS_ORIGINS=http://localhost:5173
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ Small files with a single concern. If a file grows past ~100-150 lines, it's pro
|
|||||||
|
|
||||||
### Tests
|
### Tests
|
||||||
|
|
||||||
Never in the same file as production code. Each crate keeps its tests in `crates/<crate>/tests/`, one file per unit under test, grouped by the same module as the production code. Cargo builds each top-level `tests/<group>.rs` as one integration-test binary; the group file lists its members with `#[path]`:
|
Tests live outside production files, apart from the few exceptions listed below. Each crate keeps its tests in `crates/<crate>/tests/`, one file per unit under test, grouped by the same module as the production code. Cargo builds each top-level `tests/<group>.rs` as one integration-test binary; the group file lists its members with `#[path]`:
|
||||||
|
|
||||||
```
|
```
|
||||||
crates/application/src/diary/log_review.rs
|
crates/application/src/diary/log_review.rs
|
||||||
|
|||||||
@@ -87,6 +87,6 @@ COPY --from=spa-builder /spa/dist ./spa/dist
|
|||||||
|
|
||||||
EXPOSE 3000
|
EXPOSE 3000
|
||||||
|
|
||||||
ENV RUST_LOG=server=info,tower_http=info
|
ENV RUST_LOG=server=info,worker=info,bootstrap=info,config=info,http_axum=info,tower_http=info
|
||||||
|
|
||||||
CMD ["./server"]
|
CMD ["./server"]
|
||||||
|
|||||||
@@ -151,13 +151,13 @@ Copy `.env.example` to `.env` and set the values you need. Malformed values (a n
|
|||||||
| `MINIO_ACCESS_KEY_ID` | — | S3 only | Access key ID |
|
| `MINIO_ACCESS_KEY_ID` | — | S3 only | Access key ID |
|
||||||
| `MINIO_SECRET_ACCESS_KEY` | — | S3 only | Secret access key |
|
| `MINIO_SECRET_ACCESS_KEY` | — | S3 only | Secret access key |
|
||||||
| `IMAGE_CONVERSION_ENABLED` | `false` | No | Set `true` to convert stored images to AVIF or WebP (only the value `true` enables it) |
|
| `IMAGE_CONVERSION_ENABLED` | `false` | No | Set `true` to convert stored images to AVIF or WebP (only the value `true` enables it) |
|
||||||
| `IMAGE_CONVERSION_FORMAT` | — | When conversion is enabled | `avif` or `webp`; startup fails if conversion is enabled without it |
|
| `IMAGE_CONVERSION_FORMAT` | — | When conversion is enabled | `avif` or `webp`; the worker fails at startup if conversion is enabled without it |
|
||||||
| `HOST` | `0.0.0.0` | No | Bind address |
|
| `HOST` | `0.0.0.0` | No | Bind address |
|
||||||
| `PORT` | `3000` | No | HTTP port |
|
| `PORT` | `3000` | No | HTTP port |
|
||||||
| `RATE_LIMIT` | `60` | No | Requests per minute per IP |
|
| `RATE_LIMIT` | `60` | No | Requests per minute per IP |
|
||||||
| `ALLOW_REGISTRATION` | `false` | No | Set `true` (or `1`) to allow new sign-ups |
|
| `ALLOW_REGISTRATION` | `false` | No | Set `true` (or `1`) to allow new sign-ups |
|
||||||
| `SECURE_COOKIES` | `false` | No | Set `true` when serving over HTTPS (only the value `true` enables it) |
|
| `SECURE_COOKIES` | `false` | No | Set `true` when serving over HTTPS (only the value `true` enables it) |
|
||||||
| `RUST_LOG` | — | No | Log verbosity (e.g. `server=info,worker=info`); read by the logger, not part of `config.toml` |
|
| `RUST_LOG` | — | No | Log verbosity (e.g. `server=info,worker=info,bootstrap=info,config=info,http_axum=info`); read by the logger, not part of `config.toml` |
|
||||||
| `CORS_ORIGINS` | empty | No | Comma-separated allowed origins for the API; empty or `*` allows any origin |
|
| `CORS_ORIGINS` | empty | No | Comma-separated allowed origins for the API; empty or `*` allows any origin |
|
||||||
| `EVENT_BUS_BACKEND` | `db` | No | `db` (default) or `nats` |
|
| `EVENT_BUS_BACKEND` | `db` | No | `db` (default) or `nats` |
|
||||||
| `NATS_URL` | — | NATS only | NATS connection URL (e.g. `nats://localhost:4222`) |
|
| `NATS_URL` | — | NATS only | NATS connection URL (e.g. `nats://localhost:4222`) |
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ use tokio::net::TcpListener;
|
|||||||
#[tokio::main]
|
#[tokio::main]
|
||||||
async fn main() -> anyhow::Result<()> {
|
async fn main() -> anyhow::Result<()> {
|
||||||
dotenvy::dotenv().ok();
|
dotenvy::dotenv().ok();
|
||||||
bootstrap::init_tracing("server=debug,bootstrap=debug,tower_http=debug");
|
bootstrap::init_tracing("server=debug,bootstrap=debug,config=info,tower_http=debug");
|
||||||
|
|
||||||
let config = config::load().context("Failed to load configuration")?;
|
let config = config::load().context("Failed to load configuration")?;
|
||||||
let app = bootstrap::build_server(&config).await?;
|
let app = bootstrap::build_server(&config).await?;
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ use anyhow::Context;
|
|||||||
#[tokio::main]
|
#[tokio::main]
|
||||||
async fn main() -> anyhow::Result<()> {
|
async fn main() -> anyhow::Result<()> {
|
||||||
dotenvy::dotenv().ok();
|
dotenvy::dotenv().ok();
|
||||||
bootstrap::init_tracing("worker=info,bootstrap=info,application=info,k_ap=info");
|
bootstrap::init_tracing("worker=info,bootstrap=info,config=info,application=info,k_ap=info");
|
||||||
|
|
||||||
let config = config::load().context("Failed to load configuration")?;
|
let config = config::load().context("Failed to load configuration")?;
|
||||||
let app = bootstrap::build_worker(&config).await?;
|
let app = bootstrap::build_worker(&config).await?;
|
||||||
|
|||||||
Reference in New Issue
Block a user