Skip to content

Commit 3985711

Browse files
committed
Group target, module_path and file arguments
1 parent 3f534d0 commit 3985711

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

src/__private_api.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ pub use std::{file, format_args, line, module_path, stringify};
99
pub fn log(
1010
args: Arguments,
1111
level: Level,
12-
&(target, module_path, file, line): &(&str, &'static str, &'static str, u32),
12+
&(target, module_path, file): &(&str, &'static str, &'static str),
13+
line: u32,
1314
kvs: Option<&[(&str, &str)]>,
1415
) {
1516
if kvs.is_some() {
@@ -34,7 +35,8 @@ pub fn log(
3435
pub fn log(
3536
args: Arguments,
3637
level: Level,
37-
&(target, module_path, file, line): &(&str, &'static str, &'static str, u32),
38+
&(target, module_path, file): &(&str, &'static str, &'static str),
39+
line: u32,
3840
kvs: Option<&[(&str, &dyn crate::kv::ToValue)]>,
3941
) {
4042
crate::logger().log(

src/macros.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ macro_rules! log {
3636
$crate::__private_api::log(
3737
$crate::__private_api::format_args!($($arg)+),
3838
lvl,
39-
&($target, $crate::__private_api::module_path!(), $crate::__private_api::file!(), $crate::__private_api::line!()),
39+
&($target, $crate::__private_api::module_path!(), $crate::__private_api::file!()),
40+
$crate::__private_api::line!(),
4041
$crate::__private_api::Option::Some(&[$(($crate::__log_key!($key), &$value)),+])
4142
);
4243
}
@@ -49,7 +50,8 @@ macro_rules! log {
4950
$crate::__private_api::log(
5051
$crate::__private_api::format_args!($($arg)+),
5152
lvl,
52-
&($target, $crate::__private_api::module_path!(), $crate::__private_api::file!(), $crate::__private_api::line!()),
53+
&($target, $crate::__private_api::module_path!(), $crate::__private_api::file!()),
54+
$crate::__private_api::line!(),
5355
$crate::__private_api::Option::None,
5456
);
5557
}

0 commit comments

Comments
 (0)