mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-21 03:21:16 -03: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:
@@ -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),*));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user