Skip to content

feature/unify-data-client-logging #160

@bwalsh

Description

@bwalsh

Feature: Unify logging under git-drs

--
 

Overview

git-drs currently emits logs from multiple sources, including the local git-drs logging facilities and the embedded data-client logs (see the data-client logging factory for context). The goal of this feature is to consolidate all logging output under a single git-drs logging interface so that operators can configure, filter, and route logs consistently without having to manage separate logging systems.
 

Goals

  • Provide a single, configurable logging entry point for git-drs and its data-client dependency.
  • Ensure log formatting, severity levels, and destinations are consistent across all components.
  • Maintain backward compatibility for existing git-drs log configuration where feasible.
     

Non-goals

  • Replacing third-party logging libraries beyond the scope of git-drs and data-client.
  • Changing the semantic meaning of existing log messages outside of normalization (e.g., reformatting).
     

Proposed behavior

  • git-drs exposes a centralized logging configuration that applies to both git-drs and data-client.
  • data-client log output is routed through the git-drs logging adapter, preserving level and message content.
  • Log destinations (stdout/stderr, file, structured output) are configured once and shared.
  • The unified logger supports correlation identifiers for multi-step operations (e.g., downloads, uploads).
     

Acceptance tests

  1. Unified output test
  • Configure git-drs to emit logs to a temporary file.
  • Run an operation that triggers both git-drs and data-client logging.
  • Verify the log file contains entries from both components in the same format.
  1. Level consistency test
  • Set the unified log level to WARN.
  • Trigger operations that would normally emit INFO and WARN from both git-drs and data-client.
  • Confirm that only WARN and above are present in the output.
  1. Destination consistency test
  • Configure logging to write to stderr only.
  • Run a standard git-drs command that uses data-client.
  • Confirm no logs are written to stdout and all logs appear on stderr.
  1. Correlation test
  • Start an operation that performs multiple data-client calls.
  • Verify all related logs (git-drs and data-client) include the same correlation identifier.
     

Definition of done

  • git-drs exposes a single configuration surface that controls logging for both git-drs and data-client.
  • All data-client logs are emitted through the git-drs logger with consistent formatting and levels.
  • Acceptance tests above are implemented and passing.
  • Documentation describing the unified logging configuration is added or updated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is neededquestionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions