fix(logger): migrate to winston for simpler executable support#1808
Merged
Conversation
Hweinstock
force-pushed
the
feat/logging-winston
branch
from
July 22, 2026 18:54
2928035 to
bb569a1
Compare
Hweinstock
force-pushed
the
feat/logging-winston
branch
from
July 22, 2026 18:57
bb569a1 to
e1ee9ed
Compare
AlexanderRichey
previously approved these changes
Jul 22, 2026
Hweinstock
force-pushed
the
feat/logging-winston
branch
2 times, most recently
from
July 22, 2026 20:20
e5b41ad to
5fd0c5d
Compare
Hweinstock
force-pushed
the
feat/logging-winston
branch
from
July 22, 2026 20:26
5fd0c5d to
3759362
Compare
Hweinstock
commented
Jul 22, 2026
| export function createFileLogger(config: FileLoggerConfig): AsyncLogger { | ||
| const maxSizeInMB = config.maxSizeInMB ?? 10; | ||
| const maxFileCount = config.maxFileCount ?? 5; | ||
| const maxSizeInMB = config.maxSizeInMB ?? 5; |
Contributor
Author
There was a problem hiding this comment.
the new behavior is that it rotates the file each day or when the size cap it hit. Before we rotated only when the size limit was hit. This swap ensures we maintain roughly the past 10 days but still no more than 50MB.
| await rootHandler.route(argv); | ||
| } catch (e) { | ||
| const error = e instanceof Error ? e : new Error(String(e)); | ||
| io.stderr.write(`${error.name}: ${error.message}\n`); |
Contributor
Author
There was a problem hiding this comment.
moved to top-level to ensure that logger/io init failures are logged to console.
Hweinstock
marked this pull request as ready for review
July 22, 2026 20:37
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## refactor #1808 +/- ##
=========================================
Coverage 93.91% 93.92%
=========================================
Files 118 118
Lines 6423 6432 +9
=========================================
+ Hits 6032 6041 +9
Misses 391 391 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
tejaskash
approved these changes
Jul 22, 2026
AlexanderRichey
approved these changes
Jul 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
#1801
This PR goes with option 3 from the issue link.
The original attempt lives in #1804, however there were some issues in that PR:
flushbehavior on pino due how we manually manage the output stream.Solution
buildandcheckto mirror whatcargodoes. Specifically,checkdoes static analysis without producing any artifacts, whereasbuildcompiles, packs, and produces the build artifacts.Testing
Notes