Skip to content

Commit

Permalink
Delete pattern_formatter shorthand macro
Browse files Browse the repository at this point in the history
  • Loading branch information
SpriteOvO committed Sep 18, 2022
1 parent b774bdc commit 4c38cee
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions spdlog/src/formatter/pattern_formatter/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -389,25 +389,6 @@ use crate::{
/// [`FullFormatter`]: crate::formatter::FullFormatter
pub use ::spdlog_macros::pattern;

/// Build a [`PatternFormatter`] from a pattern built by the [`pattern`] macro
/// with the given macro arguments.
///
/// `pattern_formatter!(...)` is equivalent to
/// `PatternFormatter::new(pattern!(...))`.
///
/// ```
/// # use spdlog::pattern_formatter;
/// # use spdlog::formatter::PatternFormatter;
/// #
/// let formatter: PatternFormatter<_> = pattern_formatter!("{logger}: {^[{level}]} {payload}");
/// ```
#[macro_export]
macro_rules! pattern_formatter {
( $($t:tt)* ) => {
$crate::formatter::PatternFormatter::new($crate::formatter::pattern!($($t)*))
};
}

/// A formatter that formats log records according to a specified pattern.
#[derive(Clone)]
pub struct PatternFormatter<P> {
Expand Down

0 comments on commit 4c38cee

Please sign in to comment.