mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-29 05:03:46 +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 {
|
||||
($category:ident, $($elem:expr),+ $(,)*) => {
|
||||
crate::flog::FLOG!($category, $($elem),*);
|
||||
($category:ident, $fmt: expr, $($elem:expr),+ $(,)*) => {
|
||||
crate::flog::FLOG!($category, sprintf!($fmt, $($elem),*));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user