Skip to content

Add DEBUG logging to broadcast path, use parent logger in embedded mode#39

Merged
mrz1836 merged 1 commit intomainfrom
feat/broadcast-debug-logging
Mar 31, 2026
Merged

Add DEBUG logging to broadcast path, use parent logger in embedded mode#39
mrz1836 merged 1 commit intomainfrom
feat/broadcast-debug-logging

Conversation

@shruggr
Copy link
Copy Markdown
Collaborator

@shruggr shruggr commented Mar 31, 2026

Summary

  • Add DEBUG-level logging throughout the broadcast submission path in the embedded service: transaction entry, per-endpoint response with timing, broadcast completion, and WARN for timeouts and unexpected status codes
  • Add DEBUG-level logging to the teranode HTTP client for request/response
  • Initialize() now uses the parent logger when provided instead of creating its own, enabling per-module log level control from the host application (e.g., 1sat-stack's NewComponentLogger with level override). Falls back to config-based logger for standalone mode.

Why

When debugging broadcast failures (transactions stuck in RECEIVED status, invalid merkle paths, etc.), there was zero visibility into what happened during the submission flow. These logs are all DEBUG level so they don't impact production — operators set arcade.log_level: debug only when diagnosing issues.

The logger passthrough fixes a disconnect where the host application configured a debug-level logger for the arcade component, but Initialize() discarded it and created its own INFO-level logger.

Test plan

  • go build ./... passes
  • Verify DEBUG logs appear when arcade log level is set to debug in the host application
  • Verify no log output at INFO level (default) from the new log lines

- Add DEBUG-level logs throughout SubmitTransaction: entry, duplicate
  detection, broadcast start, per-endpoint response, completion
- WARN for broadcast timeouts and unexpected status codes
- Initialize() now uses the parent logger when provided instead of
  creating its own, enabling per-module log level control from the
  host application. Falls back to config-based logger for standalone.
@shruggr shruggr requested a review from mrz1836 as a code owner March 31, 2026 10:52
@github-actions github-actions bot added feature Any new significant addition size/M Medium change (51–200 lines) labels Mar 31, 2026
@mrz1836 mrz1836 merged commit ccde459 into main Mar 31, 2026
43 of 45 checks passed
@github-actions github-actions bot deleted the feat/broadcast-debug-logging branch March 31, 2026 12:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature Any new significant addition size/M Medium change (51–200 lines)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants