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
Laravel Devlogger

Laravel Devlogger Laravel Package

onamfc/laravel-devlogger

Laravel DevLogger stores application logs in the database with automatic exception catching, tagging, queue and request/user context, advanced filtering, and configurable retention cleanup. Easily configurable via environment variables.

View on GitHub
Deep Wiki
Context7

Laravel DevLogger is a comprehensive logging package that stores your application logs directly in the database with rich metadata, automatic error catching, and powerful management capabilities. Instead of scattering logs across files, you get a queryable record of every event—complete with request context, user tracking, queue association, and custom tags.

DevLogger::onQueue('reports')->withTags(['report', 'daily'])->info('Report generated');
  • Database Logging: Persist logs with structured metadata and full request context
  • Automatic Error Catching: Capture and log all application exceptions automatically
  • Advanced Filtering: Query logs by level, date, queue, status, and tags
  • Automatic Cleanup: Configurable retention with scheduled pruning
  • User & Queue Tracking: Know who triggered each entry and from which queue
Frequently asked questions about Laravel Devlogger
How do I install onamfc/laravel-devlogger in a Laravel application?
Run composer require onamfc/laravel-devlogger, publish the DevLogger config and optional migrations, then run php artisan migrate. The package auto-loads migrations by default, but publishing them lets you review the schema before it reaches production. Finish by setting any optional DEVLOGGER_* environment variables you need.
Which Laravel versions are supported by laravel-devlogger?
The technical assessment confirms Laravel 10+ compatibility, with no version-specific changes noted in the v1.1.11 release notes. Backward compatibility risks remain for older Laravel versions, so test the package against your exact framework version before adopting it. If you maintain older applications, pin the package version and validate migrations and logging behavior in staging.
How does DevLogger automatically catch Laravel exceptions?
When DEVLOGGER_AUTO_CATCH is enabled, DevLogger captures application exceptions and stores them in the database with metadata. This is useful for centralized visibility, but the assessment warns that automatic catching can mask critical exceptions if your team relies only on DevLogger. Keep your normal alerting and external error monitoring in place, and review whether database logging should be disabled in specific environments.
How do I configure the DevLogger database connection and table name?
Publish the DevLogger configuration file, then set DEVLOGGER_DB_CONNECTION and DEVLOGGER_TABLE_NAME in your .env file; the default table is developer_logs. The package supports MySQL, PostgreSQL, and SQLite, while custom stores such as Redis or Elasticsearch require extension work. Confirm chunked cleanup behavior and storage reclamation for your specific database engine, especially on large tables.
Can I filter DevLogger logs by level, date, queue, and status?
Yes. DevLogger provides advanced filtering by level, date, queue, status, and related metadata, which is a core reason to store logs in the database. The filtering capabilities are unchanged in v1.1.11, and the assessment notes that N+1 query risks remain without new optimizations. Review query patterns and indexes if you build high-volume dashboards or admin screens.
Does laravel-devlogger track users and HTTP request context?
DevLogger can track the user who triggered a log entry and automatically capture HTTP request context, adding useful metadata for debugging. The assessment notes that v1.1.11 does not update PII redaction or encryption, so sensitive data exposure remains a concern. Review what request and user fields you store, define redaction rules, and restrict access to the developer_logs table.
How does DevLogger retention cleanup work in v1.1.11?
The devlogger:cleanup command now performs real chunked hard deletes based on DEVLOGGER_RETENTION_DAYS instead of relying on ineffective soft-delete behavior. The --dry-run output is now trustworthy because cleanupCandidates counts soft-deleted rows too, making retention verification auditable. Cleanup runs as a scheduled job, so plan for the write load and validate the first run on a mature table.
Why did DevLogger cleanup delete more logs after upgrading to v1.1.11?
Before v1.1.11, expired logs were not actually removed and soft-deleted rows were re-stamped on every run, so a backlog could accumulate. Cleanup now issues hard deletes via the query builder, and the first run on an existing install may purge a large backlog of previously soft-deleted rows. Take a backup or export before upgrading if you need recoverability, because cleanup deletes are unrecoverable and chunked commits are not all-or-nothing.
Is laravel-devlogger suitable for high-traffic production Laravel applications?
It can work in production, but it writes logs synchronously to the database, so write-heavy load and capacity planning remain critical for high-traffic apps. The package has no new async-first defaults, and the scheduled cleanup job now adds real chunked delete work that previously did not exist. For microservices or very high volume, plan to aggregate logs externally with tools such as ELK or Loki rather than relying on a single database table.
How does laravel-devlogger compare with Monolog, Sentry, Telescope, or external log aggregation?
DevLogger is a database-backed logging layer with rich metadata, automatic exception catching, tags, and advanced filtering, but it is not a replacement for external aggregation in microservices. The assessment flags duplication and conflict risk with existing Monolog, Sentry, or Telescope setups because no explicit conflict resolution is documented. Evaluate overlap in staging, decide which system owns alerting and retention, and use DevLogger alongside rather than instead of your production observability stack.
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.
hsluv/hsluv
seampact/codegen
seampact/hooks
seampact/ir
mehedimi/laravel-amp-mail
happones/laravel-vue-i18n-generator
jwerd/inertia-table
siberfx/flysystem-wasabi
hollyit/token-replace
ippanelcom/laravel-sdk
adachsoft/changelog-linter
adachsoft/collection
payerurl/telegrambot-crypto-payment-instant-payout
dskripchenko/laravel-hybrid-search
riorizkyrainey/lara-ced
mehedimi/static-vel
zharp/zharp
nonsapiens/bigquery-model-sync
lgu-bayambang-ict-office/lgu-laravel-development-standards
andydefer/laravel-support