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

Add logger to logical database backends #6566

Open
tyrannosaurus-becks opened this issue Apr 10, 2019 · 1 comment
Open

Add logger to logical database backends #6566

tyrannosaurus-becks opened this issue Apr 10, 2019 · 1 comment

Comments

@tyrannosaurus-becks
Copy link
Contributor

Unlike for regular auth and secret backends, database backends are not provided with a logger during their setup or as part of their interface. It would be great to provide the Vault logger to them. With Vault on Info level, I've been unable to gain any output from the following calls in a mounted database plugin:

hclog.Default().Info("setting username " + c.username)
fmt.Println("setting username " + c.username)
log.Print("setting username " + c.username)
q.Q("setting username " + c.username)
@meshantz
Copy link

This would be really handy.

I found a forum post that seems to apply to other plugins, but it provided me with a workaround for the moment:

If you set vault's log_level to "debug", you'll get any messages sent through your (unconfigured) hclog.Default() logger.

If anyone can advise on how to properly configure a logger to send logs back to the vault process - assuming it's possible - from a database plugin context, that would also be helpful until this is available.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants