Skip to content

Commit c8ab70b

Browse files
authored
Merge pull request #446 from hyd-dev/format-args-capture
Remove the `__private_api_log_lit` special case
2 parents 1cd39c0 + 2d1a477 commit c8ab70b

File tree

2 files changed

+0
-31
lines changed

2 files changed

+0
-31
lines changed

src/lib.rs

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1469,25 +1469,6 @@ pub fn __private_api_log(
14691469
);
14701470
}
14711471

1472-
// WARNING: this is not part of the crate's public API and is subject to change at any time
1473-
#[doc(hidden)]
1474-
pub fn __private_api_log_lit(
1475-
message: &str,
1476-
level: Level,
1477-
&(target, module_path, file, line): &(&str, &'static str, &'static str, u32),
1478-
) {
1479-
logger().log(
1480-
&Record::builder()
1481-
.args(format_args!("{}", message))
1482-
.level(level)
1483-
.target(target)
1484-
.module_path_static(Some(module_path))
1485-
.file_static(Some(file))
1486-
.line(Some(line))
1487-
.build(),
1488-
);
1489-
}
1490-
14911472
// WARNING: this is not part of the crate's public API and is subject to change at any time
14921473
#[doc(hidden)]
14931474
pub fn __private_api_enabled(level: Level, target: &str) -> bool {

src/macros.rs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,6 @@
2929
/// ```
3030
#[macro_export(local_inner_macros)]
3131
macro_rules! log {
32-
(target: $target:expr, $lvl:expr, $message:expr) => ({
33-
let lvl = $lvl;
34-
if lvl <= $crate::STATIC_MAX_LEVEL && lvl <= $crate::max_level() {
35-
// ensure that $message is a valid format string literal
36-
let _ = __log_format_args!($message);
37-
$crate::__private_api_log_lit(
38-
$message,
39-
lvl,
40-
&($target, __log_module_path!(), __log_file!(), __log_line!()),
41-
);
42-
}
43-
});
4432
(target: $target:expr, $lvl:expr, $($arg:tt)+) => ({
4533
let lvl = $lvl;
4634
if lvl <= $crate::STATIC_MAX_LEVEL && lvl <= $crate::max_level() {

0 commit comments

Comments
 (0)