refactor: 迁出日志宏,移除直接依赖
This commit is contained in:
@@ -10,6 +10,7 @@ description = "OxideJS - Generic builtin JS functions parameterized over VmHost"
|
||||
oxide_runtime_api = { path = "../oxide_runtime_api" }
|
||||
oxide_types = { path = "../oxide_types" }
|
||||
oxide_kernel = { path = "../oxide_kernel" }
|
||||
oxide_log = { path = "../oxide_log" }
|
||||
fast-float.workspace = true
|
||||
ryu.workspace = true
|
||||
memchr.workspace = true
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
#[macro_export]
|
||||
macro_rules! builtins_error {
|
||||
($($arg:tt)*) => {
|
||||
oxide_log::__log_event!("oxide::builtins", oxide_log::tracing::Level::ERROR, $($arg)*)
|
||||
};
|
||||
}
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! builtins_warn {
|
||||
($($arg:tt)*) => {
|
||||
oxide_log::__log_event!("oxide::builtins", oxide_log::tracing::Level::WARN, $($arg)*)
|
||||
};
|
||||
}
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! builtins_info {
|
||||
($($arg:tt)*) => {
|
||||
oxide_log::__log_event!("oxide::builtins", oxide_log::tracing::Level::INFO, $($arg)*)
|
||||
};
|
||||
}
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! builtins_debug {
|
||||
($($arg:tt)*) => {
|
||||
oxide_log::__log_event!("oxide::builtins", oxide_log::tracing::Level::DEBUG, $($arg)*)
|
||||
};
|
||||
}
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! builtins_trace {
|
||||
($($arg:tt)*) => {
|
||||
oxide_log::__log_event!("oxide::builtins", oxide_log::tracing::Level::TRACE, $($arg)*)
|
||||
};
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
pub mod array;
|
||||
pub mod array_buffer;
|
||||
pub mod boolean;
|
||||
pub mod builtins_log;
|
||||
pub mod data_view;
|
||||
pub mod date;
|
||||
pub mod error;
|
||||
|
||||
Reference in New Issue
Block a user