common: dedup and move banner to common/logging (#2846)

This commit is contained in:
Jon Häggblad
2023-01-16 08:32:35 +01:00
committed by GitHub
parent cc7161c113
commit dc71f6e94d
6 changed files with 26 additions and 77 deletions
+17
View File
@@ -23,3 +23,20 @@ pub fn setup_logging() {
.filter_module("sled", log::LevelFilter::Warn)
.init();
}
pub fn banner(crate_name: &str, crate_version: &str) -> String {
format!(
r#"
_ __ _ _ _ __ ___
| '_ \| | | | '_ \ _ \
| | | | |_| | | | | | |
|_| |_|\__, |_| |_| |_|
|___/
({:} - version {:})
"#,
crate_name, crate_version
)
}