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 writes to stdout, messing up output #393

Open
jeffparsons opened this issue Jun 3, 2023 · 2 comments
Open

Logger writes to stdout, messing up output #393

jeffparsons opened this issue Jun 3, 2023 · 2 comments

Comments

@jeffparsons
Copy link

Chamber writes log messages to stdout, which means they get intermingled with output that you might want to parse programmatically.

E.g.

[root@967ceb326552 dir-name]# chamber export -f json chamber-of-secrets
2023/06/03 09:39:34 WARN: failed to get session token, falling back to IMDSv1: 404 Not Found: Not Found
	status code: 404, request id: 
caused by: EC2MetadataError: failed to make EC2Metadata request
404 page not found

	status code: 404, request id: 
{"super_secret_password":"password"}

My workaround for now is to look for the first line that can be parsed as JSON. But... that's not ideal. :)

My hope is that I could either send all logs to stderr, disable them entirely, or set the minimum log level that will be printed.

@jeffparsons
Copy link
Author

BTW, I'd be happy to submit a PR for this — would just like to know maintainers' preference first.

@bhavanki
Copy link
Contributor

bhavanki commented Mar 7, 2024

Hey @jeffparsons - If you are still interested in contributing, I checked with our corporate overlords, and there is no problem at all with us accepting outside contributions. 🎉 Just be aware that your contributions will be licensed under the same MIT License that chamber already uses.

Thanks in advance!

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

No branches or pull requests

2 participants