Skip to content

Commit

Permalink
Also output to stderr when using gelf output.
Browse files Browse the repository at this point in the history
 (temporary hack until #392 is fixed)
  • Loading branch information
jbgi committed Jun 17, 2019
1 parent 756fe69 commit d48a826
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions jormungandr/src/settings/logging.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,12 @@ impl LogOutput {
Some(graylog_host_port) => {
// We generate an UUID to anonymously but uniquely identify the logs of this node.
let source = Uuid::new_v4().to_string();
let gelf_drain = Gelf::new(&source, graylog_host_port).unwrap().fuse();
Ok(format.decorate(gelf_drain))
let gelf_drain =
LogFormat::Plain.decorate(Gelf::new(&source, graylog_host_port).unwrap());
// We also log to stderr otherwise users see no logs.
// TODO: remove when multiple output is properly supported.
let stderr_drain = format.decorate_stderr();
Ok(slog::Duplicate(gelf_drain, stderr_drain).async())
}
_ => Err(Error::MissingGelfBackend),
},
Expand Down

0 comments on commit d48a826

Please sign in to comment.