Skip to content
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

Merged
merged 48 commits into from
Sep 25, 2021
Merged

Conversation

brayniac
Copy link
Contributor

@brayniac brayniac commented Aug 19, 2021

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.

@brayniac brayniac marked this pull request as draft August 19, 2021 20:45
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.
@brayniac brayniac changed the title logger: initial commit of klog functionality for segcache-rs logger: add klog functionality Aug 31, 2021
@brayniac brayniac changed the title logger: add klog functionality logger: add klog functionality for segcache-rs Aug 31, 2021
@brayniac brayniac marked this pull request as ready for review August 31, 2021 22:04
src/rust/logger/Cargo.toml Outdated Show resolved Hide resolved
src/rust/config/src/klog.rs Outdated Show resolved Hide resolved
@thinkingfish

This comment was marked as spam.

@@ -0,0 +1,49 @@
// Copyright 2021 Twitter, Inc.

This comment was marked as spam.

) -> Result<(), std::io::Error> {
writeln!(
w,
"{} {}",

This comment was marked as spam.

Copy link
Contributor Author

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.

Copy link
Contributor Author

@brayniac brayniac Sep 23, 2021

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. =)

@brayniac brayniac mentioned this pull request Sep 23, 2021
/// single `Output`.
pub struct LogBuilder {
total_buffer_size: usize,
log_message_size: usize,

This comment was marked as spam.

@brayniac brayniac merged commit bea4775 into twitter:master Sep 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants