From bf57e81f546ac552afa8021a00fb28ff2371b475 Mon Sep 17 00:00:00 2001 From: Azrenbeth <77782548+Azrenbeth@users.noreply.github.com> Date: Tue, 28 Sep 2021 14:39:18 +0100 Subject: [PATCH] Log to stderr not to a file (#74) --- Cargo.lock | 18 +++--------------- README.md | 3 --- auto_compressor/Cargo.toml | 2 +- auto_compressor/src/main.rs | 1 - 4 files changed, 4 insertions(+), 20 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 96bd51e..0f55e8d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -60,7 +60,7 @@ version = "0.1.0" dependencies = [ "anyhow", "clap", - "env_logger 0.9.0 (git+https://github.com/TilCreator/env_logger?branch=fix_pipe)", + "env_logger", "jemallocator", "log", "log-panics", @@ -145,7 +145,7 @@ name = "compressor_integration_tests" version = "0.1.0" dependencies = [ "auto_compressor", - "env_logger 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "env_logger", "log", "openssl", "postgres", @@ -267,18 +267,6 @@ dependencies = [ "termcolor", ] -[[package]] -name = "env_logger" -version = "0.9.0" -source = "git+https://github.com/TilCreator/env_logger?branch=fix_pipe#3d09e0d824d9301cf1c0d4a9f148f8cfeb216329" -dependencies = [ - "atty", - "humantime", - "log", - "regex", - "termcolor", -] - [[package]] name = "fallible-iterator" version = "0.2.0" @@ -1139,7 +1127,7 @@ name = "synapse_compress_state" version = "0.1.0" dependencies = [ "clap", - "env_logger 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "env_logger", "indicatif", "jemallocator", "log", diff --git a/README.md b/README.md index d893ce9..60995dd 100644 --- a/README.md +++ b/README.md @@ -21,9 +21,6 @@ which stores how far through the `state_groups` table the compressor has scanned The tool can be run manually when you are running out of space, or be scheduled to run periodically. -The output from the auto_compressor will be sent to `auto_compressor.log` (in the directory -that the compressor is run from). - ## Building This tool requires `cargo` to be installed. See https://www.rust-lang.org/tools/install diff --git a/auto_compressor/Cargo.toml b/auto_compressor/Cargo.toml index 46c84a6..c250183 100644 --- a/auto_compressor/Cargo.toml +++ b/auto_compressor/Cargo.toml @@ -15,7 +15,7 @@ jemallocator = "0.3.2" rand = "0.8.0" serial_test = "0.5.1" synapse_compress_state = { path = "../", features = ["no-progress-bars"] } -env_logger = { version = "0.9.0", git = "https://github.com/TilCreator/env_logger", branch = "fix_pipe" } +env_logger = "0.9.0" log = "0.4.14" log-panics = "2.0.0" anyhow = "1.0.42" diff --git a/auto_compressor/src/main.rs b/auto_compressor/src/main.rs index 15bfc5d..4cb06e2 100644 --- a/auto_compressor/src/main.rs +++ b/auto_compressor/src/main.rs @@ -37,7 +37,6 @@ fn main() { if env::var("RUST_LOG").is_err() { let mut log_builder = env_logger::builder(); - log_builder.target(env_logger::Target::Pipe(Box::new(log_file))); // Ensure panics still come through log_builder.filter_module("panic", LevelFilter::Error); // Only output errors from the synapse_compress state library