Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Php Log Rotation Laravel Package

cesargb/php-log-rotation

A framework-agnostic PHP library for rotating log files by size or time, with automatic gzip/bzip2 compression, retention limits, and cleanup of old logs. Works standalone or with Laravel, PSR-3 loggers, and custom handlers.

Deep Wiki
Context7

Product Decisions This Supports

  • Log retention and disk-cost control: Supports decisions to enforce retention policies for file-based logs generated by app code, cron jobs, queue workers, or custom PHP scripts—especially where logs are not already handled by Monolog/Laravel channels or host-level logrotate.
  • Compliance and support diagnostics: Enables product requirements around audit trails, incident forensics, and support bundles by keeping a bounded, compressed history of logs without building rotation logic in-house.
  • Build vs. buy: Strong candidate for “buy/consume” when the need is simple PHP-side rotation. It avoids custom code for file naming, size/date thresholds, compression, and max-file cleanup. Because it is MIT and small, the fallback is to fork or vendor it if maintenance becomes a concern.
  • Roadmap prioritization: Relevant for self-hosted/on-prem products, embedded PHP appliances, multi-tenant log separation, and deployments without reliable system-level log rotation. Lower priority for cloud-native products already using centralized logging with lifecycle policies.
  • Use cases: Rotating custom application logs outside Laravel’s daily/weekly channels; per-tenant or per-job log files; worker/cron logs; local development and QA environments; packaging PHP apps where host configuration is not guaranteed.
  • Operational risk reduction: Reduces disk-exhaustion incidents and unbounded log growth, which can become customer-facing outages on small or self-managed deployments.

When to Consider This Package

Consider it when:

  • You have file-based logs written by PHP code that are not already covered by Monolog’s rotating handlers, Laravel’s built-in log channels, or infrastructure-level rotation.
  • You need programmatic rotation inside the application because you cannot rely on system cron, logrotate, container sidecars, or platform log lifecycle rules.
  • You need a small, MIT-licensed utility for size- or date-based rotation, retention limits, and optionally compression, and you want to avoid writing and testing that logic yourself.
  • You are building self-hosted, on-prem, appliance, or customer-managed deployments where host configuration varies.
  • You can tolerate a low-adoption dependency after reviewing its source, tests, PHP version support, file-locking behavior, and maintainer responsiveness.

Look elsewhere when:

  • You already use Monolog RotatingFileHandler, Laravel’s daily/weekly logging, or a centralized logging stack with retention policies.
  • You need high-throughput, concurrent-safe, enterprise-grade log rotation; prefer OS-level logrotate, platform agents, or logging infrastructure.
  • Logs are critical audit/compliance records requiring strict integrity, tamper-evidence, or guaranteed delivery—use a dedicated logging/audit system.
  • The package’s maintenance, test coverage, or PHP compatibility does not meet your dependency standards; pin, fork, or implement a minimal internal alternative.
  • Your runtime is not PHP or you need rotation for non-PHP workloads.

How to Pitch It (Stakeholders)

For executives: This is a small, low-cost utility that helps prevent unbounded log growth and disk exhaustion in PHP/Laravel deployments, particularly self-hosted and on-prem environments. It supports retention and operational hygiene without a custom-build project. It is not strategic infrastructure, but it is a pragmatic build-vs-buy shortcut with low licensing friction (MIT). Approve a limited evaluation, not a platform commitment.

For engineering: Evaluate cesargb/php-log-rotation as a focused dependency for rotating logs that fall outside Monolog/Laravel channels or host-level logrotate. Confirm file-locking behavior, compression support, retention semantics, PHP version compatibility, and test coverage before adoption. If adopted, wrap it behind an internal logging/retention interface, add integration tests for concurrent writes and cleanup, and keep a fork/vendor fallback because adoption is low. Do not use it to replace centralized logging or OS-level rotation where those are available.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
frankyso/ipaymu
3mdikram/worldmoneywords
snowsoft/config
itmosoft/laravel-subscriptions
larva/laravel-ai-qwen
adachsoft/api-version-bundle
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox
pairus/product-data
fayne/laravel-filament-cms-core