diff options
author | Valentin Popov <valentin@popov.link> | 2024-07-19 15:37:58 +0300 |
---|---|---|
committer | Valentin Popov <valentin@popov.link> | 2024-07-19 15:37:58 +0300 |
commit | a990de90fe41456a23e58bd087d2f107d321f3a1 (patch) | |
tree | 15afc392522a9e85dc3332235e311b7d39352ea9 /vendor/log/src/__private_api.rs | |
parent | 3d48cd3f81164bbfc1a755dc1d4a9a02f98c8ddd (diff) | |
download | fparkan-a990de90fe41456a23e58bd087d2f107d321f3a1.tar.xz fparkan-a990de90fe41456a23e58bd087d2f107d321f3a1.zip |
Deleted vendor folder
Diffstat (limited to 'vendor/log/src/__private_api.rs')
-rw-r--r-- | vendor/log/src/__private_api.rs | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/vendor/log/src/__private_api.rs b/vendor/log/src/__private_api.rs deleted file mode 100644 index 4018077..0000000 --- a/vendor/log/src/__private_api.rs +++ /dev/null @@ -1,57 +0,0 @@ -//! WARNING: this is not part of the crate's public API and is subject to change at any time - -use crate::{Level, Metadata, Record}; -use std::fmt::Arguments; -pub use std::option::Option; -pub use std::{file, format_args, line, module_path, stringify}; - -#[cfg(not(feature = "kv_unstable"))] -pub fn log( - args: Arguments, - level: Level, - &(target, module_path, file): &(&str, &'static str, &'static str), - line: u32, - kvs: Option<&[(&str, &str)]>, -) { - if kvs.is_some() { - panic!( - "key-value support is experimental and must be enabled using the `kv_unstable` feature" - ) - } - - crate::logger().log( - &Record::builder() - .args(args) - .level(level) - .target(target) - .module_path_static(Some(module_path)) - .file_static(Some(file)) - .line(Some(line)) - .build(), - ); -} - -#[cfg(feature = "kv_unstable")] -pub fn log( - args: Arguments, - level: Level, - &(target, module_path, file): &(&str, &'static str, &'static str), - line: u32, - kvs: Option<&[(&str, &dyn crate::kv::ToValue)]>, -) { - crate::logger().log( - &Record::builder() - .args(args) - .level(level) - .target(target) - .module_path_static(Some(module_path)) - .file_static(Some(file)) - .line(Some(line)) - .key_values(&kvs) - .build(), - ); -} - -pub fn enabled(level: Level, target: &str) -> bool { - crate::logger().enabled(&Metadata::builder().level(level).target(target).build()) -} |