proxmox/proxmox-rest-server
Wolfgang Bumiller 4b9c907b68 log: introduce a shareable LogContext struct
Since hyper can spawn() more tasks, when we stop passing `WorkerTask`
references down the stack, we still need to be able to *inherit* the
current logging context. Hyper provides a way to replace its used
`spawn()` method, so we need to provide a way to reuse the logging
context.

Instead of having the `FileLogger` and warn counter separately
available with local-only access, put them behind an Arc<Mutex<>>.
Previously they already *were* behind an Arc<Mutex<>> as part of the
WorkerTaskState.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-07-11 14:45:26 +02:00
..
debian rest-server: bump version to 0.5.4-1 2024-07-10 12:44:29 +02:00
examples rest-server: update example to new ApiConfig 2023-03-02 16:14:04 +01:00
src log: introduce a shareable LogContext struct 2024-07-11 14:45:26 +02:00
Cargo.toml new worker-task crate, move WorkerTaskContext from sys 2024-07-11 14:43:37 +02:00