mirror of
https://gitee.com/openharmony/third_party_rust_log
synced 2024-11-26 17:30:24 +00:00
re-export Option to use in macros
This commit is contained in:
parent
4342193c02
commit
3b243dd2b8
@ -1625,6 +1625,12 @@ pub fn __private_api_enabled(level: Level, target: &str) -> bool {
|
||||
logger().enabled(&Metadata::builder().level(level).target(target).build())
|
||||
}
|
||||
|
||||
// WARNING: this is not part of the crate's public API and is subject to change at any time
|
||||
#[doc(hidden)]
|
||||
pub mod __private_api {
|
||||
pub use std::option::Option;
|
||||
}
|
||||
|
||||
/// The statically resolved maximum log level.
|
||||
///
|
||||
/// See the crate level documentation for information on how to configure this.
|
||||
|
@ -37,7 +37,7 @@ macro_rules! log {
|
||||
__log_format_args!($($arg)+),
|
||||
lvl,
|
||||
&($target, __log_module_path!(), __log_file!(), __log_line!()),
|
||||
std::option::Option::Some(&[$((__log_key!($key), &$value)),+])
|
||||
$crate::__private_api::Option::Some(&[$((__log_key!($key), &$value)),+])
|
||||
);
|
||||
}
|
||||
});
|
||||
@ -50,7 +50,7 @@ macro_rules! log {
|
||||
__log_format_args!($($arg)+),
|
||||
lvl,
|
||||
&($target, __log_module_path!(), __log_file!(), __log_line!()),
|
||||
std::option::Option::None,
|
||||
$crate::__private_api::Option::None,
|
||||
);
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user