mirror of
https://github.com/Lumither/nocturne.git
synced 2026-10-17 10:26:21 +00:00
feat(macros) add panic_with_log
This commit is contained in:
7 files changed
+74
-64
No files matched your search
@@ -1,3 +1,6 @@
|
||||
use macros::panic_with_log;
|
||||
use tracing::Level;
|
||||
|
||||
mod blog;
|
||||
mod init;
|
||||
mod logger;
|
||||
@@ -9,12 +12,10 @@ async fn main() {
|
||||
init::load_env();
|
||||
let _guards = init::logger_init();
|
||||
|
||||
// panic!("test");
|
||||
|
||||
match server::start().await {
|
||||
Ok(_) => {}
|
||||
Err(e) => {
|
||||
panic!("server start failed: {}", e);
|
||||
panic_with_log!(Level::ERROR, "failed to start server: {}", e);
|
||||
}
|
||||
};
|
||||
}
|
||||
Reference in new issue
Block a user