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

Convert lib/srv/regular to use slog #49792

Merged
merged 1 commit into from
Dec 6, 2024
Merged

Convert lib/srv/regular to use slog #49792

merged 1 commit into from
Dec 6, 2024

Conversation

rosstimothy
Copy link
Contributor

This starts the transition of our SSH servers to use slog. The regular.Server has been converted to use slog, though there are still various logs emitted via the srv.ServerContext from the server which use logrus.

@rosstimothy rosstimothy added the no-changelog Indicates that a PR does not require a changelog entry label Dec 4, 2024
@rosstimothy rosstimothy force-pushed the tross/regular_slog branch 2 times, most recently from 1865231 to 2d814c6 Compare December 5, 2024 13:27
@rosstimothy rosstimothy marked this pull request as ready for review December 5, 2024 14:25
server := &Server{
hostname: "redhorse",
proxyMode: true,
logger: slog.New(logutils.DiscardHandler{}),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we use a test logger so that it gets the logs when we run the tests in verbose mode (-v)?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know that the logs would provide any additional/meaningful information for this test.

lib/utils/log/slog_handler.go Show resolved Hide resolved
This starts the transition of our SSH servers to use slog. The
regular.Server has been converted to use slog, though there
are still various logs emitted via the srv.ServerContext from the
server which use logrus.
@rosstimothy rosstimothy enabled auto-merge December 6, 2024 18:13
@rosstimothy rosstimothy added this pull request to the merge queue Dec 6, 2024
Merged via the queue into master with commit 17f493a Dec 6, 2024
40 checks passed
@rosstimothy rosstimothy deleted the tross/regular_slog branch December 6, 2024 18:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-changelog Indicates that a PR does not require a changelog entry size/sm
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants