s3_scrubber: remove atty dependency (#5171)

## Problem

- https://github.com/neondatabase/neon/security/dependabot/28

## Summary of changes

Remove atty, and remove the `with_ansi` arg to scrubber's stdout logger.
This commit is contained in:
John Spray
2023-09-12 10:11:41 +01:00
committed by GitHub
parent 15eaf78083
commit 36c261851f
2 changed files with 4 additions and 2 deletions

View File

@@ -32,10 +32,10 @@ chrono = { workspace = true, default-features = false, features = ["clock", "ser
reqwest = { workspace = true, default-features = false, features = ["rustls-tls", "json"] }
aws-config = { workspace = true, default-features = false, features = ["rustls", "credentials-sso"] }
pageserver = {path="../pageserver"}
pageserver = { path = "../pageserver" }
tracing.workspace = true
tracing-subscriber.workspace = true
clap.workspace = true
tracing-appender = "0.2"
histogram = "0.7"
histogram = "0.7"

View File

@@ -19,6 +19,7 @@ use aws_sdk_s3::{Client, Config};
use reqwest::Url;
pub use s3_deletion::S3Deleter;
use std::io::IsTerminal;
use tokio::io::AsyncReadExt;
use tracing::error;
use tracing_appender::non_blocking::WorkerGuard;
@@ -179,6 +180,7 @@ pub fn init_logging(file_name: &str) -> WorkerGuard {
.with_ansi(false)
.with_writer(file_writer);
let stdout_logs = fmt::Layer::new()
.with_ansi(std::io::stdout().is_terminal())
.with_target(false)
.with_writer(std::io::stdout);
tracing_subscriber::registry()