Skip to content

[P3] Remove EVMETRICS_DEBUG / log.Printf from pkg/metrics in favour of zerolog #50

Closed

Description

@auricom

Priority: P3 (refactor) · Effort: S

Problem

pkg/metrics/metrics.go:86 isDebugEnabled() reads EVMETRICS_DEBUG from the environment on every call and writes with stdlib log.Printf, bypassing the zerolog logger and its --verbose level. The verifier already logs the same events.

Proposed fix

Delete the EVMETRICS_DEBUG branches (about −30 lines), or pass a zerolog.Logger into Metrics. Update the README's "Debug Logging" section to point at --verbose.

Pros / Cons

  • ✅ One logging system; less code.
  • ⚠️ Anyone relying on EVMETRICS_DEBUG=true needs to switch to --verbose.

Activity

  1. auricom commented on Oct 20, 2026

    @auricom
    CollaboratorAuthor

    Status after #57–#59: still valid and unchanged. isDebugEnabled() still reads EVMETRICS_DEBUG on every call and writes with stdlib log.Printf from RecordSubmissionAttempt and RecordSubmissionDaHeight, bypassing zerolog and --verbose. The README Debug Logging section still documents both mechanisms (#38), so update it together with the code. #59 added no new users of it.

  2. added 2 commits that reference this issue on Oct 20, 2026
    332d876
    1e45bfe
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions