Remove default_log_config function
The default_log_config function used to wrap log configuration code for
log-config and not(log-config). Now that log config is stable the
function was just a wrapper for a call to default_log_settings. This
change removes the function and replaces it where called with
default_log_settings.
@@ -28,7 +28,7 @@ mod routes;
mod transport;
use cylinder::{load_key_from_path, secp256k1::Secp256k1Context, Context, Signer};
-use log4rs::{Config as LogConfig, Handle};
+use log4rs::Handle;
use logging::{configure_logging, default_log_settings};
use splinter::error::InternalError;
@@ -494,7 +494,7 @@ fn main() {
let matches = app.get_matches();
- let log_handle = log4rs::init_config(default_log_config(&matches));
+ let log_handle = log4rs::init_config(default_log_settings());
let log_handle = match log_handle {
Err(e) => {
eprintln!("Could not start logging, {}", e);
@@ -571,10 +571,6 @@ fn get_config_file(matches: &'_ ArgMatches) -> Result<String, UserError> {
Ok("/etc/splinter/splinterd.toml".to_string())
}
-fn default_log_config(_matches: &ArgMatches) -> LogConfig {
- default_log_settings()
-}
-
fn start_daemon(matches: ArgMatches, _log_handle: Handle) -> Result<(), UserError> {
// get provided config file or search default location
let config_file = get_config_file(&matches)?;
