1use thiserror::Error; 2 3pub type Result<T, E = Error> = std::result::Result<T, E>; 4 5#[derive(Debug, Error)] 6pub enum Error { 7 #[error("日志系统初始化失败:{0}")] 8 InitFailed(String), 9 10 #[error(transparent)] 11 Anyhow(#[from] anyhow::Error), 12}