mirror of
https://github.com/zhom/donutbrowser.git
synced 2026-10-11 02:08:57 +02:00
refactor: better error handling
This commit is contained in:
1 parent
cd33accb1a
commit
c43f141907
8 files changed
+183
-153
No files matched your search
@@ -82,6 +82,12 @@ fn build_proxy_url(
|
||||
|
||||
#[tokio::main(flavor = "multi_thread")]
|
||||
async fn main() {
|
||||
// Initialize logger to write to stderr (which will be redirected to file)
|
||||
env_logger::Builder::from_default_env()
|
||||
.filter_level(log::LevelFilter::Debug)
|
||||
.format_timestamp_millis()
|
||||
.init();
|
||||
|
||||
// Set up panic handler to log panics before process exits
|
||||
std::panic::set_hook(Box::new(|panic_info| {
|
||||
log::error!("PANIC in proxy worker: {:?}", panic_info);
|
||||
|
||||
Reference in new issue
Block a user