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

impl Display for Partition, Segment, Stream #481

Open
hubcio opened this issue Jan 5, 2024 · 0 comments · May be fixed by #488
Open

impl Display for Partition, Segment, Stream #481

hubcio opened this issue Jan 5, 2024 · 0 comments · May be fixed by #488
Labels
good first issue Good for newcomers server iggy-servere related change

Comments

@hubcio
Copy link
Collaborator

hubcio commented Jan 5, 2024

So that there will no less info than currently.

This is already done for topic:

impl fmt::Display for Topic {
    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> std::fmt::Result {
        write!(f, "ID: {}, ", self.topic_id)?;
        write!(f, "stream ID: {}, ", self.stream_id)?;
        write!(f, "name: {}, ", self.name)?;
        write!(f, "path: {}, ", self.path)?;
        write!(f, "partitions count: {:?}, ", self.partitions.len())?;
        write!(f, "message expiry (s): {:?}, ", self.message_expiry_secs)?;
        write!(f, "max topic size (B): {:?}, ", self.max_topic_size_bytes)?;
        write!(f, "replication factor: {}, ", self.replication_factor)
    }
}

and usage:

info!("Created topic {}", topic);
info!("Updated topic: {}", topic);
info!("Loading consumer groups for topic {} from disk...", topic);
info!("Loading topic {} from disk...", topic);
info!("Loaded topic {}", topic);
info!("Saved topic {}", topic);
info!("Deleting topic {}...", topic);

The aim of this task is to also use those calls whenever possible.

@hubcio hubcio added good first issue Good for newcomers server iggy-servere related change labels Jan 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers server iggy-servere related change
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant