Skip to content

BP-69: Adopt slog for structured logging #4750

Open

Description

@merlimat

Master tracking issue for BP-69: Adopt slog for structured logging.

Summary

Adopt the slog library for structured logging across the BookKeeper codebase, replacing the ad-hoc SLF4J {}-style format strings. Retire the existing, barely-used bookkeeper-slogger module. Add an API for callers (Pulsar, applications, tools) to attach their own logging context attributes to a ledger Handle so cross-boundary log lines stay structured and correlated.

This mirrors the decision made upstream in Apache Pulsar PIP-467, whose migration is complete.

Proposal

See the full proposal at site3/website/src/pages/bps/BP-69-slog-structured-logging.md (PR forthcoming).

Implementation

Migration will be done in phases, one module per commit, each independently mergeable:

  • Phase 1: bookkeeper-common
  • Phase 2: stats, bookkeeper-common-allocator
  • Phase 3: bookkeeper-server (core, largest phase)
  • Phase 4: bookkeeper-http, tools
  • Phase 5: stream/distributedlog
  • Phase 6: metadata-drivers, benchmark, peripheral tests
  • Phase 7: Cleanup — remove bookkeeper-slogger, remove @Slf4j usage
  • Client API: withLoggerContext(Map<String, Object>) on CreateBuilder, OpenBuilder, DeleteBuilder

Sub-PRs will be linked here as they are opened.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions