refactor: split modules

This commit is contained in:
2025-04-08 02:12:06 +08:00
parent 376d2b28d3
commit 2686fa1d76
94 changed files with 1125 additions and 580 deletions

View File

@@ -10,7 +10,7 @@ use tracing_subscriber::{
};
use super::{LogFormat, LogLevel, LogRotation, LoggerConfig};
use crate::errors::app_error::RResult;
use crate::errors::RecorderResult;
// Function to initialize the logger based on the provided configuration
const MODULE_WHITELIST: &[&str] = &["sea_orm_migration", "tower_http", "sqlx::query", "sidekiq"];
@@ -74,7 +74,7 @@ impl LoggerService {
.expect("logger initialization failed")
}
pub async fn from_config(config: LoggerConfig) -> RResult<Self> {
pub async fn from_config(config: LoggerConfig) -> RecorderResult<Self> {
let mut layers: Vec<Box<dyn Layer<Registry> + Sync + Send>> = Vec::new();
if let Some(file_appender_config) = config.file_appender.as_ref() {