Weave Code
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 database logger with automatic exception catching and rich metadata. Tag and filter logs by level, date, queue, status, request context, and user. Includes configurable retention/cleanup, fallback channels, and flexible env-based setup.

View on GitHub
Deep Wiki
Context7

Logging package for Laravel that stores logs in a database with automatic error catching, advanced filtering, and management capabilities.

Frequently asked questions about Laravel Devlogger
How do I install Laravel DevLogger for Laravel 10+?
Run `composer require onamfc/laravel-devlogger`, then publish the config and migrations with `php artisan vendor:publish --tag=devlogger-config` and `php artisan vendor:publish --tag=devlogger-migrations`. Finally, execute `php artisan migrate` to set up the database schema. The package auto-loads migrations by default, so publishing them is optional.
Does Laravel DevLogger support Laravel 9 or older versions?
The package is officially tested for Laravel 10+ only. While it may work on older versions, no backward compatibility guarantees exist. Test thoroughly in a staging environment if using Laravel 9 or below. Check the release notes for version-specific changes.
Can I log exceptions automatically without manual intervention?
Yes, enable automatic exception catching by setting `DEVLOGGER_AUTO_CATCH=true` in your `.env` file. This captures all uncaught exceptions and logs them with full context, including stack traces and request data, without requiring manual logging calls.
How do I filter logs by user, queue, or request context?
Use the built-in filtering system via the `DevLogger` facade. For example, filter by user with `DevLogger::where('user_id', 123)`, by queue with `DevLogger::where('queue', 'email-queue')`, or by request context like `DevLogger::where('ip', '192.168.1.1')`. Combine filters for complex queries.
What happens if my database connection fails during logging?
The package supports fallback channels via `DEVLOGGER_FALLBACK_CHANNELS` in your `.env`. If the database is unavailable, logs will route to your configured fallback (e.g., Monolog channels like `single`, `daily`, or `syslog`). Ensure fallback channels are properly set up to avoid log loss.
How do I configure log retention to clean up old logs?
Set the `DEVLOGGER_RETENTION_DAYS` environment variable to define how many days logs should be retained. For example, `DEVLOGGER_RETENTION_DAYS=30` keeps logs for 30 days before automatic cleanup. The package runs cleanup jobs via Laravel’s scheduler; ensure your `schedule:run` command is configured.
Will Laravel DevLogger conflict with Sentry or Telescope?
No direct conflicts exist, but duplication may occur if both tools log the same exceptions. To avoid redundancy, disable automatic error catching in DevLogger (`DEVLOGGER_AUTO_CATCH=false`) or configure Sentry to ignore logged errors. Use DevLogger for structured debugging and Sentry/Telescope for alerts and notifications.
Can I use Laravel DevLogger in a microservices architecture?
DevLogger is designed for monolithic Laravel applications with centralized logging. For microservices, consider external aggregation tools like ELK, Loki, or Datadog. DevLogger’s database dependency makes it less suitable for distributed systems where logs must be collected from multiple services.
How do I add custom metadata or tags to logs?
Use the `withTags()` method to add tags, like `DevLogger::withTags(['payment', 'critical'])->error('Error message')`. For custom metadata, pass an associative array as the second argument to any log method, e.g., `DevLogger::info('Event', ['custom_key' => 'value'])`.
Is there a performance impact when logging to the database?
Yes, synchronous database writes can impact latency in high-traffic applications. For scaling, offload logging to a queue by setting `DEVLOGGER_QUEUE=true` in your `.env` and configuring a queue worker. Monitor database load and consider indexing frequently queried columns like `level`, `created_at`, or `user_id`.
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.
codifyo/ts-generator-bundle
andydefer/laravel-cluster
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky
spatie/mailcoach-vapor