Output coloured pageserver logs for tty stdout

This commit is contained in:
Kirill Bulatov
2023-01-23 14:41:09 +02:00
committed by Kirill Bulatov
parent a4be54d21f
commit fd18692dfb
3 changed files with 3 additions and 1 deletions

View File

@@ -34,7 +34,7 @@ pub fn init(log_format: LogFormat) -> anyhow::Result<()> {
let base_logger = tracing_subscriber::fmt()
.with_env_filter(env_filter)
.with_target(false)
.with_ansi(false)
.with_ansi(atty::is(atty::Stream::Stdout))
.with_writer(std::io::stdout);
match log_format {