Use tslog LogLevel for frontend logging - #112
Open
iloveitaly wants to merge 2 commits into
Open
iloveitaly wants to merge 2 commits into
iloveitaly wants to merge 2 commits into
Conversation
tslog now exports default levels (PR #308, LogLevel in v5). Drive minLevel, VITE_LOG_LEVEL, and isDebugEnabled through that API, and move the pretty template onto the v5 settings group so it actually applies. Co-authored-by: Michael Bianco <mike@mikebian.co>
Uppercase the env value before setMinLevel so it matches the exported level names, and keep prettier import order consistent. Co-authored-by: Michael Bianco <mike@mikebian.co>
iloveitaly
marked this pull request as ready for review
September 5, 2026 13:48
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.
Motivation
tslognow exports its default log levels (DefaultLogLevelsin 4.11.0 / PR #308,LogLevelin v5). We were still maintaining a local numeric map and a TODO for that PR.Description
LogLevel.WARN/LogLevel.INFOinstead of a copiedLOG_LEVEL_MAP.VITE_LOG_LEVELthroughsetMinLevel(), which resolves names case-insensitively.isDebugEnabled()withisLevelEnabled(LogLevel.DEBUG).prettyLogTemplate/hideLogPositionForProductiononto the v5prettyandstackgroups so those settings actually apply on tslog 5.Screenshots / Test
Unit tests in
web/app/configuration/logging.test.ts.Links