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

Example of how to log to a file #14

Open
mjallday opened this issue Oct 13, 2014 · 6 comments
Open

Example of how to log to a file #14

mjallday opened this issue Oct 13, 2014 · 6 comments

Comments

@mjallday
Copy link
Contributor

No description provided.

@mjallday
Copy link
Contributor Author

Example is here - https://github.com/balanced-cookbooks/balanced/pull/55/files - can place in README or similar.

@mahmoudimus
Copy link

I'm starting to really hate this templated logging configuration. It's very
hard to read and error prone.

Mahmoud Abdelkader
Co-founder & CTO @ Balanced

On Tue, Oct 14, 2014 at 8:20 AM, Marshall Jones [email protected]
wrote:

Example is here -
https://github.com/balanced-cookbooks/balanced/pull/55/files - can place
in README or similar.


Reply to this email directly or view it on GitHub
#14 (comment).

@mahmoudimus
Copy link

For example, in my playbooks, I'm now doing: https://github.com/balanced-ops/ansible-balanced/blob/master/tasks/base.yml#L50-L51 to ensure it renders correctly, but this can be really hard to debug to know what is going on.

@mjallday
Copy link
Contributor Author

That's definitely handy, however yesterday I still ran into a couple of converge issues while testing this out. Stupid shit like the formatter wasn't specified correctly, it is syntactically correct but it will fail when actually used.

It would be great if we could actually configure a logger and write to it.

@mjallday
Copy link
Contributor Author

The other issue with your example (I suspect) is that it's using the system python, if you import 3rd party libraries won't it break?

@mahmoudimus
Copy link

@mjallday not necessarily, ideally, you'd do something like: https://github.com/balanced-ops/ansible-balanced/blob/master/tasks/base.yml#L9

/opt/balanced/embedded/bin/python -c ..

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

2 participants