Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Http Log Bundle

CI Packagist Version Packagist Downloads License PHP Symfony GitHub stars Coverage

Found this useful? Give it a star on GitHub! It helps us maintain and improve the project.

Symfony bundle that intercepts HTTP requests and responses, stores them with configurable body policies by content type, redaction, and a secured admin UI with filter, export (CSV/JSON), and purge/retention — with optional Messenger async persistence.

📋 Compatible with Symfony 7.0+ and 8.x (PHP 8.2+)

FrankenPHP Friendly Worker Mode

This bundle is FrankenPHP worker mode friendly.

What is this?

Http Log Bundle captures each HTTP exchange on kernel terminate, classifies response bodies (html, json, soap, xml, text, binary, other), applies redaction rules, and persists to Doctrine. Operators browse logs at /admin/http-log, export filtered results, and purge by retention policy.

Features

  • ✅ Kernel subscriber capture with sampling, environment filter, and sub-request toggle
  • ✅ Body policy by content type with max_body_bytes truncation
  • ✅ Redaction for headers, query parameters, and JSON paths
  • ✅ Doctrine entity HttpLogEntry with indexes for filter queries
  • ✅ Secured admin UI (filter, detail, export, purge) — REQ-UI-002
  • ✅ CLI: nowo:http-log:export, nowo:http-log:purge
  • ✅ Messenger async: persist, export, purge handlers
  • ✅ Ignore routes (fnmatch) and path prefixes (admin UI excluded by default)
  • ✅ Symfony Flex recipe and FrankenPHP demo (demo/symfony8)
  • ✅ GitHub Spec Kit baseline and 100% coverage target on src/

Quick start

composer require nowo-tech/http-log-bundle
# config/packages/nowo_http_log.yaml
nowo_http_log:
    capture:
        response_body_by_type:
            json: true
    security:
        access_roles:
            - ROLE_ADMIN
php bin/console doctrine:schema:update --force
# Configure symfony/messenger when async: true (default)

Admin UI: /admin/http-log (requires ROLE_ADMIN by default).

Development

make up
make test
make -C demo/symfony8 up
make demo-smoke

Documentation

Additional documentation

Tests and coverage

Language Coverage (approx.) Command
PHP 100% on src/ (make test-coverage) make test-coverage
make test
make test-coverage
make test-coverage-100
make release-check

Run make test-coverage after cloning to refresh the coverage badge and CI threshold (target: 100% on src/).

License

MIT — see LICENSE.

About

Symfony bundle: intercept HTTP requests/responses with configurable body policies, redaction, and a secured admin UI (export & purge).

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages