feat: migrate to new backend logging convention#34
Merged
Conversation
b74f26b to
1127550
Compare
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.
Summary
Adopts the convention defined in
local-dev/logging.md. Part of the 4-repo backend logging migration.src/utils/logger/index.ts— TS port of AquiGorka/go-logger. Five methods (info,event,debug,error,scope), four levels.src/config/logger.tsexportscreateLogger(). No module-level singleton.provider-auth,wallet-auth,payment-session,discord-notifyfree functions take{ log }deps; scope internally.handle<X>(deps). Sub-routers (auth, account, admin, utxo, pay, waitlist) becomebuildXRouter(deps).appendRequestIdMiddleware,adminMiddlewaretake{ log }.console.warncalls migrated.LOG.tracedropped (no equivalent).withSpan, span events, trace-context middleware preserved.Logging coverage
Verified locally (pre-push)
deno fmt --check: cleandeno lint: cleandeno task test:unit: 21 passed, 0 failedgrep -rn 'LOG\.(...)' src/: 0 hitsgrep -rn 'console\.(...)' src/(excl logger module): 0 hitsTest plan