Skip to content

feat: add Logger::init() call to monitoring server startup paths#453

Merged
mvillmow merged 1 commit into
mainfrom
336-auto-impl
Apr 26, 2026
Merged

feat: add Logger::init() call to monitoring server startup paths#453
mvillmow merged 1 commit into
mainfrom
336-auto-impl

Conversation

@mvillmow
Copy link
Copy Markdown
Collaborator

Summary

Initializes the logger explicitly in both HealthCheckServer::start() and PrometheusExporter::start() methods to ensure spdlog is ready before the first log message is emitted.

This implements explicit startup initialization rather than relying on the lazy initialization guard in Logger::log(), providing a clearer and more explicit initialization contract.

Changes

  • Added Logger::init() call to HealthCheckServer::start() immediately after the running flag check
  • Added Logger::init() call to PrometheusExporter::start() immediately after the running flag check
  • Both calls are idempotent (Logger::init() checks for existing logger before creating a new one)

Testing

  • Format check passed
  • No compilation changes required (Logger::init() is already available and idempotent)

Closes #336

@mvillmow mvillmow enabled auto-merge (rebase) April 26, 2026 00:16
@github-actions
Copy link
Copy Markdown

✅ Dependency Audit

Severity Count
Critical 0
High 0
Medium 0
Low 0

See the Security tab for detailed findings.


Workflow: Dependency Audit

@github-actions
Copy link
Copy Markdown

Security Scan Results

  • ❌ Secret Scanning: Potential secrets found
  • ✅ SAST: Completed (check Security tab for details)
  • ✅ Dependency Scanning: Completed
  • ✅ C++ Static Analysis: Completed
  • ✅ Docker Image Scanning: 0 high, 22 medium vulnerabilities (acceptable)

Recommendations

  • Review findings in the GitHub Security tab
  • Check artifact uploads for detailed reports
  • Address critical Docker vulnerabilities immediately

Workflow: Security Scanning

Initialize the logger explicitly in both HealthCheckServer::start() and
PrometheusExporter::start() methods to ensure spdlog is ready before the
first log message is emitted. This follows best practices and removes
reliance on the lazy initialization guard in Logger::log().

Closes #336

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@mvillmow mvillmow merged commit 3a027ad into main Apr 26, 2026
9 checks passed
@mvillmow mvillmow deleted the 336-auto-impl branch April 26, 2026 18:30
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.

Add Logger::init() call to monitoring server startup paths

1 participant