dig-logging 0.1.3

Shared structured logging + log-collection building block for the DIG service binaries (dig-node, dig-dns, dig-updater): dual JSONL-file + human-stderr sinks, a per-OS log-dir convention, daily rotation + a byte-cap janitor, run_id/op_id correlation, a versioned redaction engine, and a reusable `logs` CLI verb set.
Documentation
# Publish dig-logging to crates.io when a vX.Y.Z tag is pushed (the tag-on-merge release.yml cuts it).
# This crate is a VERSIONED crates.io dependency of its consumers (dig-node, dig-dns, dig-updater),
# NOT a git dep — per the dig_ecosystem #681 no-git-deps policy. Requires the CARGO_REGISTRY_TOKEN
# repo secret (a crates.io API token); the job fails fast + explains if it is not set.
name: Publish to crates.io

on:
  push:
    tags:
      - 'v*'
  workflow_dispatch:
    inputs:
      version:
        description: 'Version to publish (e.g., v0.1.0)'
        required: true
        type: string

env:
  CARGO_TERM_COLOR: always

jobs:
  test:
    name: Test Suite
    runs-on: ubuntu-latest
    steps:
      - name: Checkout code
        uses: actions/checkout@v4

      - name: Install Rust toolchain
        uses: dtolnay/rust-toolchain@stable
        with:
          toolchain: stable
          components: rustfmt, clippy

      - name: Cache dependencies
        uses: Swatinem/rust-cache@v2

      - name: Check formatting
        run: cargo fmt --all -- --check

      - name: Check clippy
        run: cargo clippy --all-targets --all-features -- -D warnings

      - name: Run tests
        run: cargo test --all-features -- --test-threads=1

      - name: Check documentation
        run: cargo doc --no-deps --all-features

  publish:
    name: Publish to crates.io
    runs-on: ubuntu-latest
    needs: test
    if: startsWith(github.ref, 'refs/tags/v') || github.event_name == 'workflow_dispatch'
    steps:
      - name: Checkout code
        uses: actions/checkout@v4

      - name: Install Rust toolchain
        uses: dtolnay/rust-toolchain@stable
        with:
          toolchain: stable

      - name: Cache dependencies
        uses: Swatinem/rust-cache@v2

      - name: Verify the crate builds + packages
        run: |
          cargo build --release
          cargo package --allow-dirty

      - name: Require CARGO_REGISTRY_TOKEN
        run: |
          if [ -z "${{ secrets.CARGO_REGISTRY_TOKEN }}" ]; then
            echo "::error::CARGO_REGISTRY_TOKEN is not set. Create a crates.io API token and add it"
            echo "as the CARGO_REGISTRY_TOKEN repository secret to enable publishing."
            exit 1
          fi

      - name: Publish to crates.io
        run: cargo publish --allow-dirty --token "${{ secrets.CARGO_REGISTRY_TOKEN }}"