-
Notifications
You must be signed in to change notification settings - Fork 175
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
logger: add klog functionality for segcache-rs #335
Conversation
Adds a new logger which has command logger specific functionality. Adds command logging to pelikan_segcache_rs. Changes to the memcache wire protocol to support providing the necessary context for command logging. Fixes `cas` operation in seg storage implementation.
Merge master into feature branch and resolve merge conflicts due to metrics library changes.
Refactors the logger crate prior to review
This comment was marked as spam.
This comment was marked as spam.
@@ -0,0 +1,49 @@ | |||
// Copyright 2021 Twitter, Inc. |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
) -> Result<(), std::io::Error> { | ||
writeln!( | ||
w, | ||
"{} {}", |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 agree. #341 opened to track that
#[macro_export] | ||
macro_rules! klog { | ||
($($arg:tt)*) => ( | ||
error!(target: "klog", $($arg)*); |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not strictly true - there's a LevelFilter::Off
variant, which will filter Level::Error
, but added a comment that conveys what you're asking for. =)
src/rust/logger/src/single.rs
Outdated
/// single `Output`. | ||
pub struct LogBuilder { | ||
total_buffer_size: usize, | ||
log_message_size: usize, |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Adds a new logger which has command logger specific functionality.
Adds command logging to pelikan_segcache_rs.
Changes to the memcache wire protocol to support providing the
necessary context for command logging.