Skip to content

logger: add optional debug() as a diagnostic-only logging seam - #7

Closed
TheGreatAxios wants to merge 1 commit into
cl-5066-corbits-tag-reconcile-tagthreadpost-convertmarkdown-opt-outfrom
cl-5104-corbits-tag-add-loggerdebug-as-an-optional-diagnostic-only
Closed

logger: add optional debug() as a diagnostic-only logging seam#7
TheGreatAxios wants to merge 1 commit into
cl-5066-corbits-tag-reconcile-tagthreadpost-convertmarkdown-opt-outfrom
cl-5104-corbits-tag-add-loggerdebug-as-an-optional-diagnostic-only

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Contributor

Summary

  • Adds an optional debug(message: string): void to tag-slack's Logger type, alongside the existing warn. defaultLogger routes it to console.debug.
  • warn is for fail-soft conditions a host should see by default; debug is for diagnostic-only lines a host can opt into without adopting a full log-level system. Optional so existing host loggers (which only implement warn) keep compiling and working unchanged — an absent debug means debug lines are silently dropped, never an error.
  • No call site in this PR. Stacked on Reconcile TagThread.post(): convertMarkdown opt-out + Block Kit blocks/unfurl suppression #6 (not because it depends on that code, but to keep CI green-before-stacking per review order); the first caller (a slash-command diagnostic) lands with the slash-commands slice later in this series.

Test plan

  • CI: bun run typecheck && bun run test
  • Type-only/additive change to an existing seam with no existing dedicated test file; covered indirectly by every existing wire.test.ts/index.test.ts case that still passes with the widened Logger type.

warn() is for fail-soft conditions a host should see by default; debug()
is for diagnostic-only lines a host can opt into without adopting a full
log-level system. Optional so existing host loggers (which only
implement warn) keep working unchanged.
@TheGreatAxios
TheGreatAxios deleted the branch cl-5066-corbits-tag-reconcile-tagthreadpost-convertmarkdown-opt-out August 2, 2026 20:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant