slog-rs logging (#171)
* added global slog instance, changed all logging macro formats to include logger instance * adding configuration to logging, allowing for multiple log outputs * updates to test, changes to build docs * rustfmt * moving logging functions into util crate
This commit is contained in:
committed by
Ignotus Peverell
parent
b85006ebe5
commit
8e382a7593
@@ -22,6 +22,7 @@ use std::fs::File;
|
||||
use toml;
|
||||
use grin::ServerConfig;
|
||||
use pow::types::MinerConfig;
|
||||
use util::LoggingConfig;
|
||||
use types::{ConfigMembers, GlobalConfig, ConfigError};
|
||||
|
||||
/// The default file name to use when trying to derive
|
||||
@@ -37,6 +38,7 @@ impl Default for ConfigMembers {
|
||||
ConfigMembers {
|
||||
server: ServerConfig::default(),
|
||||
mining: Some(MinerConfig::default()),
|
||||
logging: Some(LoggingConfig::default()),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,6 +30,7 @@ extern crate grin_grin as grin;
|
||||
extern crate grin_p2p as p2p;
|
||||
extern crate grin_wallet as wallet;
|
||||
extern crate grin_pow as pow;
|
||||
extern crate grin_util as util;
|
||||
|
||||
pub mod config;
|
||||
pub mod types;
|
||||
|
||||
+9
-5
@@ -20,6 +20,7 @@ use std::fmt;
|
||||
|
||||
use grin::ServerConfig;
|
||||
use pow::types::MinerConfig;
|
||||
use util::LoggingConfig;
|
||||
|
||||
/// Error type wrapping config errors.
|
||||
#[derive(Debug)]
|
||||
@@ -99,9 +100,12 @@ pub struct ConfigMembers {
|
||||
pub server: ServerConfig,
|
||||
/// Mining config
|
||||
pub mining: Option<MinerConfig>,
|
||||
//removing wallet from here for now,
|
||||
//as its concerns are separate from the server's, really
|
||||
//given it needs to manage keys. It should probably
|
||||
//stay command line only for the time being
|
||||
//pub wallet: Option<WalletConfig>
|
||||
/// Logging config
|
||||
pub logging: Option<LoggingConfig>,
|
||||
|
||||
//removing wallet from here for now,
|
||||
//as its concerns are separate from the server's, really
|
||||
//given it needs to manage keys. It should probably
|
||||
//stay command line only for the time being
|
||||
//pub wallet: Option<WalletConfig>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user