Skip to content

Commit

Permalink
remove multiple logging backends from tests, leave only file output
Browse files Browse the repository at this point in the history
  • Loading branch information
filip-dulic-bloxico committed Apr 6, 2021
1 parent e014e06 commit 6a9b668
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 36 deletions.
Expand Up @@ -301,18 +301,11 @@ impl ConfigurationBuilder {
(None, false) => default_log_file(),
(None, true) => {
let path = default_log_file();
node_config.log = Some(Log(vec![
LogEntry {
level: "trace".to_string(),
format: "json".to_string(),
output: LogOutput::Stdout,
},
LogEntry {
level: "trace".to_string(),
format: "json".to_string(),
output: LogOutput::File(path.clone()),
},
]));
node_config.log = Some(Log(LogEntry {
level: "trace".to_string(),
format: "json".to_string(),
output: LogOutput::File(path.clone()),
}));
path
}
};
Expand Down
Expand Up @@ -130,18 +130,11 @@ impl Controller {
}

let log_file_path = dir.child("node.log").path().to_path_buf();
config.log = Some(Log(vec![
LogEntry {
format: "json".into(),
level: "debug".into(),
output: LogOutput::Stdout,
},
LogEntry {
format: "json".into(),
level: "debug".into(),
output: LogOutput::File(log_file_path.clone()),
},
]));
config.log = Some(Log(LogEntry {
format: "json".into(),
level: "debug".into(),
output: LogOutput::File(log_file_path.clone()),
}));

if let PersistenceMode::Persistent = spawn_params.get_persistence_mode() {
let path_to_storage = dir.child("storage").path().into();
Expand Down
17 changes: 5 additions & 12 deletions testing/jormungandr-scenario-tests/src/node.rs
Expand Up @@ -763,18 +763,11 @@ impl<'a, R: RngCore, N> SpawnBuilder<'a, R, N> {
fn set_log_level(&mut self, log_file: &Path) {
let format = "plain";
let level = self.context.log_level();
self.node_settings.config.log = Some(Log(vec![
LogEntry {
format: format.to_string(),
level: level.to_string(),
output: LogOutput::Stderr,
},
LogEntry {
format: format.to_string(),
level,
output: LogOutput::File(log_file.to_path_buf()),
},
]));
self.node_settings.config.log = Some(Log(LogEntry {
format: format.to_string(),
level,
output: LogOutput::File(log_file.to_path_buf()),
}));
}

pub fn command<P: AsRef<Path>, Q: AsRef<Path>>(
Expand Down

0 comments on commit 6a9b668

Please sign in to comment.