diff --git a/server/docker/config/promtail.yaml b/server/docker/config/promtail.yaml index 3a8d3e6..74064b0 100644 --- a/server/docker/config/promtail.yaml +++ b/server/docker/config/promtail.yaml @@ -13,8 +13,3 @@ scrape_configs: labels: job: rusty-plugins __path__: /var/log/rusty-controller/**/*.log - - targets: - - localhost - labels: - job: rusty-server - __path__: /var/log/rusty-controller/**/daily** diff --git a/server/src/tracing_setup.rs b/server/src/tracing_setup.rs index 6d20b35..0d04eb1 100644 --- a/server/src/tracing_setup.rs +++ b/server/src/tracing_setup.rs @@ -26,22 +26,13 @@ fn build_loki_layer() -> (tracing_loki::Layer, BackgroundTask) { } pub async fn setup_loki() { - let directory = fs::create_dir_all("/var/log/rusty-controller/server") - .await - .map(|_| { - tracing::info!("Failed to create directory in /var/log. Using ./logs"); - LOGS_DIRECTORY - }) - .unwrap_or("logs"); - - let file = tracing_appender::rolling::daily(directory, "daily"); let filter = filter::Targets::new() .with_target("rusty_controller", Level::DEBUG) .with_default(Level::WARN); let registry = tracing_subscriber::registry().with(filter).with( fmt::layer() - .with_writer(io::stdout.and(file)) + .with_writer(io::stdout) ); let http = Client::new();