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

Convert to logxi #1755

Merged
merged 1 commit into from Aug 21, 2016
Merged

Convert to logxi #1755

merged 1 commit into from Aug 21, 2016

Conversation

jefferai
Copy link
Member

No description provided.

@jefferai jefferai force-pushed the logxi branch 17 times, most recently from fa89965 to 803696c Compare August 21, 2016 19:59
@@ -281,18 +291,20 @@ func (b *backend) getLdapGroups(cfg *ConfigEntry, c *ldap.Conn, userDN string, u
ldapMap := make(map[string]bool)

if cfg.GroupFilter == "" {
b.Logger().Printf("[WARN] auth/ldap: GroupFilter is empty, will not query server")
b.Logger().Warn("auth/ldap: GroupFilter is empty, will not query server")
Copy link
Member

Choose a reason for hiding this comment

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

IsWarn check is missing here and in the next log message as well.

As a general comment, it is a real pain to check IsDebug or IsWarn before printing anything.

Is it not possible that the Logger().Debug() will only print if Debug is enabled. So we can conveniently skip the check.

Copy link
Member Author

Choose a reason for hiding this comment

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

@jefferai jefferai force-pushed the logxi branch 2 times, most recently from ba934f6 to dedbf27 Compare August 21, 2016 20:20
c.Ui.Output(fmt.Sprintf("Unknown log level %s", logLevel))
return 1
}
switch os.Getenv("LOGXI_FORMAT") {
Copy link
Member

Choose a reason for hiding this comment

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

Should we rename this to VAULT_LOGXI_FORMAT?

Copy link
Member Author

Choose a reason for hiding this comment

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

@jefferai jefferai force-pushed the logxi branch 3 times, most recently from ed5480d to 821c71f Compare August 21, 2016 20:33
writer.Write([]byte(" [ALL] "))
}

writer.Write([]byte(msg + " "))
Copy link
Member

Choose a reason for hiding this comment

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

If we remove the " " from here, we can remove the if i > 0 { check below?

Copy link
Member Author

Choose a reason for hiding this comment

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

@vishalnayak
Copy link
Member

LGTM! Very good job!

@jefferai jefferai merged commit 6beadc1 into master Aug 21, 2016
@jefferai jefferai deleted the logxi branch August 21, 2016 23:28
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.

None yet

2 participants