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

Allow setting log format #942

Closed
jamesgoodhouse opened this issue Sep 11, 2020 · 1 comment · Fixed by #1056
Closed

Allow setting log format #942

jamesgoodhouse opened this issue Sep 11, 2020 · 1 comment · Fixed by #1056

Comments

@jamesgoodhouse
Copy link

It appears the log format is driven solely off of whether gomplate is being ran in a terminal or not. I'm currently running it within a Docker container and am receiving logs in JSON format when a more human readable format would be preferred.

@hairyhenderson
Copy link
Owner

@jamesgoodhouse true. Do you often have a need for the logs? They're meant primarily for troubleshooting, but I'm certainly interested to hear about your logging use-case!

As for what to do about this - does the JSON format have any value to you at all? Or does it make more sense to always output the more human-readable format?

If both formats are useful, I don't think it's a common-enough thing that it warrants a --log-format=... flag, but maybe a GOMPLATE_LOG_FORMAT environment variable would be enough?

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

Successfully merging a pull request may close this issue.

2 participants