feat: add build file and add commit hash and version in debug info
This commit is contained in:
parent
3d0436f18e
commit
e7a2c67998
2 changed files with 40 additions and 2 deletions
|
@ -20,7 +20,10 @@ mod error;
|
|||
fn main() {
|
||||
let config = configuration::Config::from_file(&env::var("CONFIG").unwrap_or(String::from("./config.toml")));
|
||||
setup_logger(&config);
|
||||
debug!("Config: {:#?}", &config);
|
||||
trace!("Config: {:#?}", &config);
|
||||
|
||||
debug!("commit: {}", env!("GIT_COMMIT_HASH"));
|
||||
debug!("version: {}", env!("GIT_TAG"));
|
||||
|
||||
let input_files = files::get_files(&config.files.input_path)
|
||||
.into_iter()
|
||||
|
@ -99,7 +102,7 @@ fn setup_logger(config: &configuration::Config) {
|
|||
.size(10 * 1000)
|
||||
.roll_count(10)
|
||||
.time_format("%Y-%m-%d %H:%M:%S")
|
||||
.level(if config.is_debug() { "debug" } else { "info" })
|
||||
.level(if config.is_debug() { "trace" } else { "info" })
|
||||
.output_file()
|
||||
.output_console()
|
||||
.build();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue