mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-02-27 05:59:52 +08:00
Implement FLOGF formatting
Note: This *requires* an argument after the format string: ```rust FLOGF!(debug, "foo"); ``` won't compile. I think that's okay, because in that case you should just use FLOG. An alternative is to make it skip the sprintf.
This commit is contained in:
parent
798d7427f7
commit
53a5ce52c5
@ -191,10 +191,9 @@ macro_rules! FLOG {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO implement.
|
|
||||||
macro_rules! FLOGF {
|
macro_rules! FLOGF {
|
||||||
($category:ident, $($elem:expr),+ $(,)*) => {
|
($category:ident, $fmt: expr, $($elem:expr),+ $(,)*) => {
|
||||||
crate::flog::FLOG!($category, $($elem),*);
|
crate::flog::FLOG!($category, sprintf!($fmt, $($elem),*));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user