Skip to content

Add hierarchical log category gates#189

Merged
codeforester merged 1 commit into
mainfrom
enhancement/187-20260724-log-category-gates
Jul 25, 2026
Merged

Add hierarchical log category gates#189
codeforester merged 1 commit into
mainfrom
enhancement/187-20260724-log-category-gates

Conversation

@codeforester

Copy link
Copy Markdown
Collaborator

Summary

  • add a category gate that is independent of terminal and persistent-sink
    thresholds
  • resolve dotted categories from exact name to nearest parent to default
  • add log_is_enabled so callers can avoid expensive diagnostics when no sink
    will consume them
  • make unconfigured named terminal loggers inherit the default threshold
  • apply the same category and sink decisions to file-content logging

The default category gate remains permissive through VERBOSE, preserving
existing unscoped behavior and the INFO-terminal/DEBUG-primary-log contract
introduced in #185.

Issue

Closes #187

Validation

  • bats lib/bash/std/tests/lib_std.bats — 150 tests passed locally, with one
    environment-specific process-listing skip
  • ./tests/validate.sh — 310 tests passed
  • git diff --check

Notes

Checklist

  • Branch name follows <category>/<issue>-<YYYYMMDD>-<slug>.
  • Pull request is scoped to one issue, unless a documented multi-issue exception applies.
  • Pull request body explains what changed and how it was validated.
  • Relevant project checks pass.
  • Documentation is updated when behavior or user-facing commands change.
  • CHANGELOG is updated for notable user-visible or release-worthy changes.
  • Pull request includes Fixes #<issue> or Closes #<issue> when merge should close the issue.

@codeforester
codeforester marked this pull request as ready for review July 25, 2026 00:47
@codeforester
codeforester merged commit 92d1569 into main Jul 25, 2026
2 checks passed
@codeforester
codeforester deleted the enhancement/187-20260724-log-category-gates branch July 25, 2026 00:50
codeforester added a commit that referenced this pull request Jul 25, 2026
## Summary

- tag every internal std, arg, file, Git, and GitHub record with its
  `base_bash_libs.<module>` category
- default the parent `base_bash_libs` gate to INFO so application DEBUG
does
  not implicitly enable reusable-library DEBUG
- preserve explicit parent and child category opt-ins
- make `--debug-wrapper` enable both terminal and library DEBUG
- deprecate the Bash-only `VERBOSE` level, `log_verbose*` helpers, and
  `--verbose-wrapper` without changing their 1.x runtime behavior

## Issue

Closes #188

## Dependency

- #189 merged the category API from #187 into `main`
- this branch is rebased directly onto that merged prerequisite

## Validation

- `bats tests/launcher.bats lib/bash/std/tests/lib_std.bats
lib/bash/git/tests/lib_git.bats`
— 204 tests passed locally, with one environment-specific
process-listing
  skip
- `bats lib/bash/file/tests/lib_file.bats` — 34 tests passed
- `./tests/validate.sh` — 314 tests passed
- `bash -n` for the launcher and all changed library modules
- audit found no uncategorized internal severity calls in the five
logging
  modules
- `git diff --check`

## Notes

- Deprecated symbols remain available, retain their exact thresholds,
and do
  not emit runtime warnings.
- `DEBUG` is the most detailed level for new code; deprecated
compatibility
  surfaces can be removed no earlier than the next major release.
- Deprecating `basectl --verbose-wrapper` remains a separate Base
issue/PR
  after this library train is merged and available.
- `VERSION` remains unchanged; this work is targeted to the `v1.4.0`
  milestone.

## Checklist

- [x] Branch name follows `<category>/<issue>-<YYYYMMDD>-<slug>`.
- [x] Pull request is scoped to one issue, unless a documented
multi-issue exception applies.
- [x] Pull request body explains what changed and how it was validated.
- [x] Relevant project checks pass.
- [x] Documentation is updated when behavior or user-facing commands
change.
- [x] CHANGELOG is updated for notable user-visible or release-worthy
changes.
- [x] Pull request includes `Fixes #<issue>` or `Closes #<issue>` when
merge should close the issue.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add hierarchical log-category gates and enabled checks

1 participant