server: implement access log rotation with re-open via command socket

re-use the future we already have for task log rotation to trigger
it.

Move the FileLogger in ApiConfig into an Arc, so that we can actually
update it and REST using the new one.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht committed 2020-11-02 19:53:30 +01:00
1 parent 04b053d87e
commit fe4cc5b1a1
4 files changed
+52 -8

No files matched your search

+1 -1
View File
@@ -112,7 +112,7 @@ pub struct ApiService {
}
fn log_response(
logfile: Option<&Mutex<FileLogger>>,
logfile: Option<&Arc<Mutex<FileLogger>>>,
peer: &std::net::SocketAddr,
method: hyper::Method,
path_query: &str,