mirror of
https://github.com/pjh456/OxideJS.git
synced 2026-10-23 18:21:13 +08:00
feat: 编译管线/类型层 crate 补全多级日志宏 + 关键路径日志
This commit is contained in:
@@ -10,6 +10,8 @@
|
||||
//! trait 面向泛型而非对象安全:单态化 `H = Vm` 使每个 `host.*()` 调用内联,
|
||||
//! 相对 builtins 直接位于 `oxide_vm` 内部没有运行时开销。
|
||||
|
||||
mod runtime_api_log;
|
||||
|
||||
use std::sync::Arc;
|
||||
|
||||
use oxide_kernel::kernel::{KernelCore, KernelSession};
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
//! runtime_api 日志宏:`runtime_api_error!/warn!/info!/debug!/trace!`,经由 oxide_log 上报。
|
||||
//! 接口层供编译管线与运行时共享,日志归 Kernel 子系统
|
||||
//! (`OXIDE_LOG=oxide::kernel=debug` 控制本 crate 日志)。
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! runtime_api_error {
|
||||
($($arg:tt)*) => {
|
||||
oxide_log::__log_event!("oxide::kernel", oxide_log::tracing::Level::ERROR, $($arg)*)
|
||||
};
|
||||
}
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! runtime_api_warn {
|
||||
($($arg:tt)*) => {
|
||||
oxide_log::__log_event!("oxide::kernel", oxide_log::tracing::Level::WARN, $($arg)*)
|
||||
};
|
||||
}
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! runtime_api_info {
|
||||
($($arg:tt)*) => {
|
||||
oxide_log::__log_event!("oxide::kernel", oxide_log::tracing::Level::INFO, $($arg)*)
|
||||
};
|
||||
}
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! runtime_api_debug {
|
||||
($($arg:tt)*) => {
|
||||
oxide_log::__log_event!("oxide::kernel", oxide_log::tracing::Level::DEBUG, $($arg)*)
|
||||
};
|
||||
}
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! runtime_api_trace {
|
||||
($($arg:tt)*) => {
|
||||
oxide_log::__log_event!("oxide::kernel", oxide_log::tracing::Level::TRACE, $($arg)*)
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user