Skip to content

Commit

Permalink
✨ Add NullLogger
Browse files Browse the repository at this point in the history
  • Loading branch information
arthurlm committed Dec 11, 2023
1 parent b1f89a2 commit 371d1a2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion quickfix/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ pub use dictionary::Dictionary;
pub use error::QuickFixError;
pub use group::Group;
pub use header::Header;
pub use log_factory::{LogCallback, LogFactory, StdLogger};
pub use log_factory::{LogCallback, LogFactory, NullLogger, StdLogger};
pub use message::Message;
pub use message_store_factory::{
FfiMessageStoreFactory, FileMessageStoreFactory, MemoryMessageStoreFactory,
Expand Down
6 changes: 6 additions & 0 deletions quickfix/src/log_factory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,12 @@ impl<C: LogCallback> Drop for LogFactory<'_, C> {
}
}

/// Drop every log message.
#[derive(Debug)]
pub struct NullLogger;

impl LogCallback for NullLogger {}

/// Log message to std file descriptors.
#[derive(Debug)]
pub enum StdLogger {
Expand Down

0 comments on commit 371d1a2

Please sign in to comment.