feat(log): 将内核日志统一为新的logger (#814)

This commit is contained in:
曾俊
2024-05-16 17:25:23 +08:00
committed by GitHub
parent 92deae638b
commit 2eab6dd743
181 changed files with 1321 additions and 1261 deletions

View File

@ -40,7 +40,7 @@ macro_rules! define_unified_initializer_slice {
static $name: [::unified_init::UnifiedInitializer] = [..];
};
() => {
compile_error!(
compile_kerror!(
"define_unified_initializer_slice! requires at least one argument: slice_name"
);
};
@ -54,7 +54,7 @@ macro_rules! define_public_unified_initializer_slice {
pub static $name: [::unified_init::UnifiedInitializer] = [..];
};
() => {
compile_error!(
compile_kerror!(
"define_unified_initializer_slice! requires at least one argument: slice_name"
);
};
@ -66,7 +66,7 @@ macro_rules! unified_init {
($initializer_slice:ident) => {
for initializer in $initializer_slice.iter() {
initializer.call().unwrap_or_else(|e| {
kerror!("Failed to call initializer {}: {:?}", initializer.name(), e);
log::error!("Failed to call initializer {}: {:?}", initializer.name(), e);
});
}
};