Skip to content

Mixing log/slog and log packages across codebase #79

@poyrazK

Description

@poyrazK

Why is this an issue?

The codebase mixes log/slog (structured logging) and log (standard library) across different files. Using both creates inconsistency in log format and makes log aggregation/filtering harder.

What is causing it?

  • cmd/clouddns/main.go uses slog (structured)
  • cmd/iana-import/main.go, cmd/iana-bench/main.go, cmd/apikey/main.go use log (print-style)
  • internal/adapters/repository/postgres.go uses log.Printf for error logging

How can it be solved?

Standardize on log/slog everywhere. Migrate utilities and cmd tools to use slog.

Category

  • Small
  • Medium
  • Large

Severity

  • Low
  • Medium
  • High
  • Critical

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions