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

Toggle JSON logging #653

Closed
kazauwa opened this issue Jun 17, 2022 · 5 comments
Closed

Toggle JSON logging #653

kazauwa opened this issue Jun 17, 2022 · 5 comments
Labels
enhancement New feature or request

Comments

@kazauwa
Copy link
Contributor

kazauwa commented Jun 17, 2022

Feature request

Allow to opt-in for JSON logs so they can be easily parsed.
I think the implementation is pretty straightforward, and I can get it done over the weekend.

@kazauwa kazauwa added the enhancement New feature or request label Jun 17, 2022
@kazauwa
Copy link
Contributor Author

kazauwa commented Jun 18, 2022

I suppose the implementation could be something like that:
https://github.com/juanfont/headscale/compare/main...kazauwa:feature/json-logs?expand=1

Setting json_logs to true swtiches to default zerolog formatting:

{"level":"info","path":"/var/lib/headscale/private.key","time":1655553834,"message":"No private key file at path, creating..."}

@iSchluff
Copy link
Contributor

this seems useful, would you mind creating a pull request?

@kazauwa
Copy link
Contributor Author

kazauwa commented Aug 26, 2022

Done
Didn't want to create a PR before hearing from maintainers

@iSchluff
Copy link
Contributor

not a maintainer, just keen on this feature :)

@kradalby kradalby added this to the v0.17.0 milestone Sep 8, 2022
@juanfont
Copy link
Owner

Merged #768

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants