Skip to content

feat(cli): rotate file logs for coderd #15438

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

Merged
merged 4 commits into from
Nov 12, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
lint
  • Loading branch information
defelmnq committed Nov 12, 2024
commit f2afcedb37c8709ebfd711223022a8b51fa018d9
2 changes: 0 additions & 2 deletions cli/clilog/clilog.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,7 @@ func (b *Builder) Build(inv *serpent.Invocation) (log slog.Logger, closeLog func
}
closers = append(closers, logWriter.Close)
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this give us the equivalent behaviour of lumberjackWriteCloseFixer in cli/agent.go?

Copy link
Member

Choose a reason for hiding this comment

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

I think we should probably re-use that same fix here, although the main reason for that seems to have been to reduce CI flakes due to racy writes after close. We probably won't be logging to a file in CI in the general case.

sinks = append(sinks, sinkFn(logWriter))

}

return nil
}

Expand Down
Loading