pax_global_header 0000666 0000000 0000000 00000000064 15154661113 0014515 g ustar 00root root 0000000 0000000 52 comment=d67e19da3dd41ec83afa28e18a1a85b02769bbd9
dry-rb-dry-logger-0f5f58a/ 0000775 0000000 0000000 00000000000 15154661113 0015405 5 ustar 00root root 0000000 0000000 dry-rb-dry-logger-0f5f58a/.github/ 0000775 0000000 0000000 00000000000 15154661113 0016745 5 ustar 00root root 0000000 0000000 dry-rb-dry-logger-0f5f58a/.github/FUNDING.yml 0000664 0000000 0000000 00000000017 15154661113 0020560 0 ustar 00root root 0000000 0000000 github: hanami
dry-rb-dry-logger-0f5f58a/.github/ISSUE_TEMPLATE/ 0000775 0000000 0000000 00000000000 15154661113 0021130 5 ustar 00root root 0000000 0000000 dry-rb-dry-logger-0f5f58a/.github/ISSUE_TEMPLATE/bug-report.md 0000664 0000000 0000000 00000000672 15154661113 0023545 0 ustar 00root root 0000000 0000000 ---
name: "\U0001F41B Bug report"
about: See CONTRIBUTING.md for more information
title: ''
labels: bug, help wanted
assignees: ''
---
## Describe the bug
A clear and concise description of what the bug is.
## To Reproduce
Provide detailed steps to reproduce, **an executable script would be best**.
## Expected behavior
A clear and concise description of what you expected to happen.
## My environment
- Ruby version: ...
- OS: ...
dry-rb-dry-logger-0f5f58a/.github/ISSUE_TEMPLATE/config.yml 0000664 0000000 0000000 00000000240 15154661113 0023114 0 ustar 00root root 0000000 0000000 blank_issues_enabled: false
contact_links:
- name: Community support
url: https://discourse.hanamirb.org
about: Please ask and answer questions here.
dry-rb-dry-logger-0f5f58a/.github/SUPPORT.md 0000664 0000000 0000000 00000000462 15154661113 0020445 0 ustar 00root root 0000000 0000000 ## Support
If you need help with any of the Hanami, Dry or Rom libraries, feel free to ask questions on our [discussion forum](https://discourse.hanamirb.org/). This is the best place to seek help. Make sure to search for a potential solution in past threads before posting your question. Thanks! :heart:
dry-rb-dry-logger-0f5f58a/.github/workflows/ 0000775 0000000 0000000 00000000000 15154661113 0021002 5 ustar 00root root 0000000 0000000 dry-rb-dry-logger-0f5f58a/.github/workflows/ci-lint.yml 0000664 0000000 0000000 00000001350 15154661113 0023063 0 ustar 00root root 0000000 0000000 name: CI lint
on:
push:
branches: ["main", "release-*", "ci/*"]
tags: ["v*"]
paths:
- ".github/**"
pull_request:
branches: ["main", "release-*"]
paths:
- ".github/**"
schedule:
- cron: "0 0 * * 0" # every Sunday at midnight
permissions: {}
jobs:
zizmor:
name: Run zizmor
runs-on: ubuntu-latest
permissions:
security-events: write # Required for upload-sarif (used by zizmor-action) to upload SARIF files.
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
with:
persist-credentials: false
- name: Run zizmor
uses: zizmorcore/zizmor-action@0dce2577a4760a2749d8cfb7a84b7d5585ebcb7d
dry-rb-dry-logger-0f5f58a/.github/workflows/ci.yml 0000664 0000000 0000000 00000007327 15154661113 0022131 0 ustar 00root root 0000000 0000000 # This file is synced from hanakai-rb/repo-sync
name: CI
run-name: ${{ github.ref_type == 'tag' && format('Release {0}', github.ref_name) || 'CI' }}
on:
push:
branches: ["main", "release-*", "ci/*"]
tags: ["v*"]
pull_request:
branches: ["main", "release-*"]
schedule:
- cron: "30 4 * * *"
jobs:
tests:
name: Tests (Ruby ${{ matrix.ruby }})
runs-on: ubuntu-latest
continue-on-error: ${{ matrix.optional || false }}
strategy:
fail-fast: false
matrix:
ruby:
- "4.0"
- "3.4"
- "3.3"
- "3.2"
- "jruby"
include:
- ruby: "4.0"
coverage: "true"
env:
COVERAGE: ${{ matrix.coverage }}
steps:
- name: Checkout
uses: actions/checkout@0c366fd6a839edf440554fa01a7085ccba70ac98
- name: Install package dependencies
run: "[ -e $APT_DEPS ] || sudo apt-get install -y --no-install-recommends $APT_DEPS"
- name: Set up Ruby
uses: ruby/setup-ruby@ea73ddb198f027c31d496ef5749cf297fe1a0695 # zizmor: ignore[cache-poisoning]
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Run all tests
id: test
run: |
status=0
bundle exec rake || status=$?
if [ ${status} -ne 0 ] && [ "${{ matrix.optional }}" == "true" ]; then
echo "::warning::Optional matrix job failed."
echo "optional_fail=true" >> "${GITHUB_OUTPUT}"
echo "optional_fail_status=${status}" >> "${GITHUB_OUTPUT}"
exit 0 # Ignore error here to keep the green checkmark
fi
exit ${status}
- name: Create optional failure comment
if: ${{ matrix.optional && github.event.pull_request }}
uses: hanakai-rb/repo-sync/pr-comment-artifact@main
with:
name: ci-ruby-${{ matrix.ruby }}
pr-number: ${{ github.event.pull_request.number }}
comment-tag: ruby-${{ matrix.ruby }}-optional-failure
message: "ℹ️ Optional job failed: Ruby ${{ matrix.ruby }}"
mode: ${{ steps.test.outputs.optional_fail == 'true' && 'upsert' || 'delete' }}
workflow-keepalive:
if: github.event_name == 'schedule'
runs-on: ubuntu-latest
permissions:
actions: write
steps:
- uses: liskin/gh-workflow-keepalive@v1
release:
runs-on: ubuntu-latest
if: github.ref_type == 'tag'
needs: tests
steps:
- name: Trigger release workflow
uses: actions/github-script@450193c5abd4cdb17ba9f3ffcfe8f635c4bb6c2a
with:
github-token: ${{ secrets.RELEASE_MACHINE_DISPATCH_TOKEN }}
script: |
const tag = context.ref.replace("refs/tags/", "");
const repo = context.repo.owner + "/" + context.repo.repo;
const tagMessage = await github.rest.git.getTag({
owner: context.repo.owner,
repo: context.repo.repo,
tag_sha: context.sha
}).then(res => res.data.message).catch(() => "");
const announce = /(skip-announce|no-announce)/i.test(tagMessage) ? "false" : "true";
await github.rest.actions.createWorkflowDispatch({
owner: "hanakai-rb",
repo: "release-machine",
workflow_id: "release.yml",
ref: "main",
inputs: { repo, tag, announce }
});
const workflowUrl = "https://github.com/hanakai-rb/release-machine/actions/workflows/release.yml";
await core.summary
.addHeading("Release Triggered")
.addRaw(`Triggered release workflow for ${tag}`)
.addLink("View release workflow", workflowUrl)
.write();
dry-rb-dry-logger-0f5f58a/.github/workflows/pr-comments.yml 0000664 0000000 0000000 00000001620 15154661113 0023770 0 ustar 00root root 0000000 0000000 # This file is synced from hanakai-rb/repo-sync
# Downloads comment artifacts from completed workflows and posts them to PRs. This allows source
# workflows to run with read-only permissions on fork PRs while still posting comments via this
# privileged workflow that runs in the base repo context.
#
# Comment artifacts should be generated using the `hanakai-rb/repo-sync/pr-comment-artifact@main`
# action.
name: PR comments
on: # zizmor: ignore[dangerous-triggers]
workflow_run:
workflows: ["CI"]
types:
- completed
permissions:
pull-requests: write
jobs:
post-comments:
runs-on: ubuntu-latest
permissions:
pull-requests: write
if: github.event.workflow_run.event == 'pull_request'
steps:
- name: Post comments
uses: hanakai-rb/repo-sync/pr-comments-from-artifacts@main
with:
workflow-run-id: ${{ github.event.workflow_run.id }}
dry-rb-dry-logger-0f5f58a/.github/workflows/repo-sync-preview.yml 0000664 0000000 0000000 00000002677 15154661113 0025137 0 ustar 00root root 0000000 0000000 name: Repo-sync preview
on: # zizmor: ignore[dangerous-triggers]
workflow_run:
workflows: ["CI", "RuboCop", "CI lint"]
types: [completed]
branches:
- "ci/repo-sync-preview-*"
jobs:
report:
runs-on: ubuntu-latest
permissions: {}
if: >
github.event.workflow_run.event == 'push' &&
github.event.workflow_run.head_repository.fork == false
steps:
- name: Dispatch status to repo-sync
uses: actions/github-script@450193c5abd4cdb17ba9f3ffcfe8f635c4bb6c2a
with:
github-token: ${{ secrets.REPO_SYNC_DISPATCH_TOKEN }}
script: |
const { BRANCH, REPO, WORKFLOW, STATUS, RUN_URL } = process.env;
await github.rest.actions.createWorkflowDispatch({
owner: "hanakai-rb",
repo: "repo-sync",
workflow_id: "aggregate-preview-status.yml",
ref: "main",
inputs: {
pr_number: BRANCH.replace("ci/repo-sync-preview-", ""),
repo_name: REPO,
workflow_name: WORKFLOW,
status: STATUS,
run_url: RUN_URL
}
});
env:
BRANCH: ${{ github.event.workflow_run.head_branch }}
REPO: ${{ github.repository }}
WORKFLOW: ${{ github.event.workflow_run.name }}
STATUS: ${{ github.event.workflow_run.conclusion }}
RUN_URL: ${{ github.event.workflow_run.html_url }}
dry-rb-dry-logger-0f5f58a/.github/workflows/rubocop.yml 0000664 0000000 0000000 00000001346 15154661113 0023202 0 ustar 00root root 0000000 0000000 # frozen_string_literal: true
# This file is synced from hanakai-rb/repo-sync
name: RuboCop
on:
push:
branches: ["main", "release-*", "ci/*"]
tags: ["v*"]
pull_request:
branches: ["main", "release-*"]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
env:
BUNDLE_ONLY: tools
steps:
- uses: actions/checkout@0c366fd6a839edf440554fa01a7085ccba70ac98
with:
persist-credentials: false
- name: Set up Ruby 4.0
uses: ruby/setup-ruby@896e71e063dc0933bb442a54e949d75291991ecb # zizmor: ignore[cache-poisoning]
with:
ruby-version: 4.0
bundler-cache: true
- name: Run RuboCop
run: bundle exec rubocop --parallel
dry-rb-dry-logger-0f5f58a/.gitignore 0000664 0000000 0000000 00000000150 15154661113 0017371 0 ustar 00root root 0000000 0000000 /.bundle/
/.yardoc
/_yardoc/
/coverage/
/doc/
/log/
/pkg/
/spec/reports/
/tmp/
Gemfile.lock
/.rubocop-*
dry-rb-dry-logger-0f5f58a/.rspec 0000664 0000000 0000000 00000000070 15154661113 0016517 0 ustar 00root root 0000000 0000000 --color
--require spec_helper
--order random
--warnings
dry-rb-dry-logger-0f5f58a/.rubocop.yml 0000664 0000000 0000000 00000000223 15154661113 0017654 0 ustar 00root root 0000000 0000000 # This file is synced from hanakai-rb/repo-sync
inherit_from:
- https://raw.githubusercontent.com/hanakai-rb/repo-sync/main/rubocop/rubocop.yml
dry-rb-dry-logger-0f5f58a/CHANGELOG.md 0000664 0000000 0000000 00000011014 15154661113 0017213 0 ustar 00root root 0000000 0000000 # Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Break Versioning](https://www.taoensso.com/break-versioning).
## [Unreleased]
### Added
### Changed
### Deprecated
### Removed
### Fixed
### Security
[Unreleased]: https://github.com/dry-rb/dry-logger/compare/v1.2.2...main
## [1.2.2] - 2026-03-13
### Fixed
- Exception when message and metadata have different encodings (@katafrakt in #40)
[1.2.2]: https://github.com/dry-rb/dry-logger/compare/v1.2.1...v1.2.2
## [1.2.1] - 2025-12-16
### Changed
- Support Ruby 4.0 by adding the `"logger"` gem to the list of runtime dependencies. (@timriley in #39)
### Fixed
- Ensure changes to `logger.context` and calls to `logger.tagged` are threadsafe. (@timriley in #38)
[1.2.1]: https://github.com/dry-rb/dry-logger/compare/v1.2.0...v1.2.1
## [1.2.0] - 2025-11-05
### Changed
- When a block is given when logging, do not execute the block if the severity is lower than the configured logger level. (@p8 in #33)
- When a block is given when logging, and that block returns a hash, use that hash as the log payload. (@p8 in #34)
### Fixed
- When filtering logged data, filter on a copy of the given hash, rather then mutating it directly. (@timriley in #35)
## [1.1.0] - 2025-04-17
### Added
- Support `::Logger`'s log rotation in stream-based logger backends, via `shift_size:` and `shift_age:` arguments (@wuarmin in #31)
## [1.0.4] - 2024-05-10
### Fixed
- Accept log messages via given block, ensuring compatibility with standard Ruby logger (via #28) (@komidore64)
### Changed
- Drop support for Ruby 2.7 (via #29) (@timriley)
## [1.0.3] - 2022-12-09
### Added
- Support for ruby 2.7 (needs backports gem that *you* need to add to your Gemfile) (via #24) (@solnic)
## [1.0.2] - 2022-11-24
### Fixed
- Handle `:log_if` in Proxy constructors (via #23) (@solnic)
## [1.0.1] - 2022-11-23
### Fixed
- Support for `log_if` in proxied loggers (via 81115320b490034ddf9dfe4f3775322b9271e0cd) (@solnic)
- Support exceptions and payloads in proxied loggers (via 93b3fd59ebbdc7e63620eb064694d58455df831f) (@solnic)
## [1.0.0] - 2022-11-17
This is a port of the original Hanami logger from hanami-utils extended with support for logging
dispatchers that can log to different destinations and plenty more.
### Added
- Support arbitrary logging backends through proxy (via #12) (@solnic)
- Support for conditional logging when using arbitrary logging backends (via #13) (@solnic)
- Support for registering templates via `Dry::Logger.register_template` (via #14) (@solnic)
- Support for payload keys as template tokens (via #14) (@solnic)
- Support for payload value formatter methods, ie if there's `:verb` token your formatter can implement `format_verb(value)` (via #14) (@solnic)
- Support block-based setup (via #16) (@solnic)
- Support for defining cherry-picked keys from the payload in string templates (via #17) (@solnic)
- Support for `%s` template token. It will be replaced by a formatted payload, excluding any key that you specified explicitly in the template (via #17) (@solnic)
- Support for colorized output using color tags in templates (via #18) (@solnic)
- Support for `colorize: true` logger option which enables severity coloring in string formatter (via #18) (@solnic)
- `:details` template: `"[%s] [%s] [%