pylogging 0.1.1

A small, ergonomic logging library inspired by Python's logging module.
Documentation
name: CI

on:
  push:
    branches: [main, master]
  pull_request:
    branches: [main, master]

# Least privilege: CI only needs to read the repository contents.
permissions:
  contents: read

env:
  CARGO_TERM_COLOR: always
  RUSTFLAGS: "-D warnings"

jobs:
  test:
    name: Test (${{ matrix.rust }})
    runs-on: ubuntu-latest
    strategy:
      fail-fast: false
      matrix:
        # MSRV (from Cargo.toml `rust-version`) plus the current stable.
        rust: ["1.87", "stable"]
    steps:
      - name: Checkout
        uses: actions/checkout@v4

      - name: Install Rust toolchain
        uses: dtolnay/rust-toolchain@master
        with:
          toolchain: ${{ matrix.rust }}

      - name: Cache cargo registry and build
        uses: Swatinem/rust-cache@v2

      - name: Build
        run: cargo build --all-targets --verbose

      - name: Test
        run: cargo test --all-targets --verbose

      - name: Doctests
        run: cargo test --doc --verbose

  lint:
    name: Format and Clippy
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v4

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

      - name: Cache cargo registry and build
        uses: Swatinem/rust-cache@v2

      - name: rustfmt
        run: cargo fmt --all --check

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