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

Fix logrusWrapper shrink interfaces slice into an interface #449

Merged
merged 1 commit into from
Jan 25, 2021

Conversation

wuYin
Copy link
Contributor

@wuYin wuYin commented Jan 25, 2021

Issue

logrusWrapper formatter shrank []interface{} args into an interface{}, cause logrus formatter missing arguments.

Format case

ls.log.Debugf("Successfully looked up topic{%s} on broker. %s / %s - Use proxy: %t",
               topic, lr.GetBrokerServiceUrl(), lr.GetBrokerServiceUrlTls(), lr.GetProxyThroughServiceUrl())

Logging looks like:

DEBU[0000] Successfully looked up topic{[persistent://public/default/topic-1 pulsar://localhost:6651  %!s(bool=false)]} on broker. %!s(MISSING) / %!s(MISSING) - Use proxy: %!t(MISSING)  serviceURL="pulsar://localhost:6650"

Modifications

Expand []interface{} before invoke logrus logger, pass them to logrus intact.

Verifying this change

  • Make sure that the change passes the CI checks.

@wolfstudy wolfstudy added this to the 0.4.0 milestone Jan 25, 2021
Copy link
Member

@wolfstudy wolfstudy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM +1

@wolfstudy
Copy link
Member

ping @merlimat PTAL thanks

@merlimat merlimat merged commit 462394f into apache:master Jan 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants