Repository navigation
feat(service): configurable log level, JSON output and sampling - #1144
Open
sbalabanov wants to merge 1 commit into
Open
sbalabanov wants to merge 1 commit into
sbalabanov wants to merge 1 commit into
Conversation
sbalabanov
force-pushed
the
log/1b-configurable-logger
branch
from
November 25, 2026 23:54
fb7cd91 to
4ceba8b
Compare
Servers build their logger with service/logging, which reads LOG_LEVEL and LOG_FORMAT and keeps the production sampling and stack-trace settings. The periodic metrics snapshot loops are removed, and Compose files, READMEs and the quickstart document the new variables. The MySQL queue applies IncreaseLevel only when raising the level, so a queue level below the service level no longer prints a plain-text error to stderr. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
sbalabanov
force-pushed
the
log/1b-configurable-logger
branch
from
November 25, 2026 23:56
4ceba8b to
7154ea4
Compare
sbalabanov
marked this pull request as ready for review
November 25, 2026 23:56
This branch has not been deployed
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.
TLDR: Services now read
LOG_LEVELandLOG_FORMATto choose how much they log and whether output is JSON or console, and no longer dump a metrics snapshot every 10 seconds.Changes
service/logging:New()builds a zap production logger (sampling and Error-level stack traces kept) fromLOG_LEVEL(debug, info, warn, error; default info) andLOG_FORMAT(json or console; default json). Invalid values return an error naming the variable.logging.New()instead ofzap.NewDevelopment().LOG_LEVEL(empty means info) andLOG_FORMAT(default console).IncreaseLevelwhen the requested level is above the service logger's level, so a lowerQUEUE_LOG_LEVELno longer prints a plain-text stderr line; the "created SQL queue" line reports the effective level.doc/howto/QUICKSTART.mdnow explainsLOG_LEVELandLOG_FORMATand usesLOG_LEVEL=debug QUEUE_LOG_LEVEL=debugfor queue debug output.QUEUE_LOG_LEVELcan only raise the queue logger aboveLOG_LEVEL, so queue debug output needs both set to debug.Test Plan
make fmt,make lint,make check-gazelle,make check-tidypass on a staged tree.bazel test //service/... //platform/extension/messagequeue/...passes exceptTestNewProfiles_GitChangeProviderReadsARealRepositoryin//service/submitqueue/orchestrator/server, which needs a localgpgsmand fails identically on main.grep -rn 'NewDevelopment\|metrics snapshot' service/returns nothing.make local-submitqueue-start, thenmake local-submitqueue-logsshows console output with no Debug lines. Rerun withLOG_LEVEL=debug make local-submitqueue-startand Debug lines appear; addLOG_FORMAT=jsonfor JSON output andQUEUE_LOG_LEVEL=debugfor queue debug lines. The local stack was not started in this session.🤖 Generated with Claude Code