Skip to content

Commit

Permalink
Default to using StdoutLock for writing
Browse files Browse the repository at this point in the history
  • Loading branch information
gsson committed Nov 15, 2023
1 parent db88348 commit 054b9a5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tracing-logstash/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ use tracing_subscriber::fmt::MakeWriter;
use tracing_subscriber::layer::Context;
use tracing_subscriber::registry::LookupSpan;

pub struct Layer<S, E = LogstashFormat, W = fn() -> std::io::Stdout> {
pub struct Layer<S, E = LogstashFormat, W = fn() -> std::io::StdoutLock<'static>> {
record_separator: Vec<u8>,
make_writer: W,
event_format: E,
Expand All @@ -25,7 +25,7 @@ impl<S> Default for Layer<S> {
fn default() -> Self {
Self {
record_separator: vec![b'\n'],
make_writer: std::io::stdout,
make_writer: || std::io::stdout().lock(),
event_format: Default::default(),
_inner: Default::default(),
}
Expand Down

0 comments on commit 054b9a5

Please sign in to comment.