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

feat: Use log/slog for logging to file or stdout #493

Merged
merged 1 commit into from Dec 9, 2023

Conversation

ananthb
Copy link
Contributor

@ananthb ananthb commented Dec 7, 2023

Switched to Go1.21 to use the log/slog package for strutctured logging.

TODO: Log messages that are stringifying objects can now use strutctured output.

TODO: Customise log levels for different messages.

@tombh tombh marked this pull request as ready for review December 8, 2023 00:54
@tombh
Copy link
Member

tombh commented Dec 8, 2023

This is great! Thank you so much.

Does that test failure make sense? I haven't run the tests in so long, I'm not sure if it's your PR or just the test setup needs updating.

@ananthb
Copy link
Contributor Author

ananthb commented Dec 8, 2023

That test should pass now. I hadn't switched out the frameLogger to slog fully.

@tombh
Copy link
Member

tombh commented Dec 8, 2023

Nice. Could you squash the new commit? Then I'll get this merged.

Switched to Go1.21 to use the log/slog package for strutctured logging.

TODO: Log messages that are stringifying objects can now use strutctured
output.

TODO: Customise log levels for different messages.

Fix tests
@ananthb
Copy link
Contributor Author

ananthb commented Dec 8, 2023

I have a few more improvements I'd like to do with logging. I can raise more PRs for those.

@tombh tombh merged commit f93a4d1 into browsh-org:master Dec 9, 2023
3 checks passed
@tombh
Copy link
Member

tombh commented Dec 9, 2023

So I think I'll wait for those then we can do a release.

@ananthb ananthb deleted the go1.21-and-docs branch December 9, 2023 08:14
tombh added a commit that referenced this pull request Jan 29, 2024
* Bump fast-json-patch and web-ext in /webext by @dependabot in #461
* Bump loader-utils from 2.0.2 to 2.0.4 in /webext by @dependabot in #453
* remove unnecessary RUN command by @lpmi-13 in #466
* Bump http-cache-semantics from 4.1.0 to 4.1.1 in /webext by @dependabot in #467
* fix: Golang install: use "amd64" for "x86_64" by @tombh in #463
* feat: Use log/slog for logging to file or stdout by @ananthb in #493
* feat: Structured log messages by @ananthb in #494
* chore: Clean up SETUP guides by @ananthb in #495
* chore: Remove manual install steps by @ananthb in #496
* fix: If debug is false discard logs by @ananthb in #497
* [Fix] Firefox inspecting logic on Windows by @Dragon1573 in #502
* feat: Add json schema (#505) by @Freed-Wu in #510

* @lpmi-13 made their first contribution in #466
* @ananthb made their first contribution in #493
* @Dragon1573 made their first contribution in #502
* @Freed-Wu made their first contribution in #510
@tombh tombh mentioned this pull request Jan 29, 2024
tombh added a commit that referenced this pull request Jan 29, 2024
* Bump fast-json-patch and web-ext in /webext by @dependabot in #461
* Bump loader-utils from 2.0.2 to 2.0.4 in /webext by @dependabot in #453
* remove unnecessary RUN command by @lpmi-13 in #466
* Bump http-cache-semantics from 4.1.0 to 4.1.1 in /webext by @dependabot in #467
* fix: Golang install: use "amd64" for "x86_64" by @tombh in #463
* feat: Use log/slog for logging to file or stdout by @ananthb in #493
* feat: Structured log messages by @ananthb in #494
* chore: Clean up SETUP guides by @ananthb in #495
* chore: Remove manual install steps by @ananthb in #496
* fix: If debug is false discard logs by @ananthb in #497
* [Fix] Firefox inspecting logic on Windows by @Dragon1573 in #502
* feat: Add json schema (#505) by @Freed-Wu in #510

* @lpmi-13 made their first contribution in #466
* @ananthb made their first contribution in #493
* @Dragon1573 made their first contribution in #502
* @Freed-Wu made their first contribution in #510
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

Successfully merging this pull request may close these issues.

None yet

2 participants