Download the PHP package dotburo/laravel-molog without Composer
On this page you can find all versions of the php package dotburo/laravel-molog. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package laravel-molog
Molog for Laravel
Laravel Molog enables you to log messages and store metrics that are related to specific models. Akin to Spatie's Activity Log, but slightly more generic and with the possibility to associate metrics (Gauges) to messages or to any other Laravel model. The gauges factory class also provides builtin timer, incrementation and percentage methods.
In its simplest form:
A slightly more advanced example — a message with metrics for a custom model:
Good old exception logging:
Features
- Attach log messages and metrics (gauges) to models
- Follows the PSR-3: Logger Interface
- Exception logging
- Start & stop timer metrics
- Increment and decrement methods for gauges
- Output messages and metrics to string
- Generic HTTP controller
Requirements
| Package | PHP | Laravel |
|---|---|---|
^2.0 |
8.3, 8.4 | 12.x, 13.x |
^1.6 |
7.4 – 8.2 | 7.x – 10.x |
Version 2.0 raises the minimum requirements to PHP 8.3 and Laravel 12. Stay on ^1.6 if your
application still runs on Laravel 11 or older.
Usage
Install with composer from packagist.org:
The service provider is registered automatically through package auto-discovery, so there is
nothing to add to bootstrap/providers.php.
The package's migration is loaded straight from the package, so php artisan migrate is enough to
create the messages and gauges tables. Publish the files only if you want to own them:
Publish the config before migrating if you want the tables to use UUID primary keys
(molog.primary_key_type).
Wherever you need logging, use the Logging trait. See the documentation for more usage examples.
Testing
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
- dotburo
- All Contributors
License
GNU General Public License (GPL). Please see the license file for more information.
All versions of laravel-molog with dependencies
psr/log Version ^3.0
illuminate/config Version ^12.0 || ^13.0
illuminate/console Version ^12.0 || ^13.0
illuminate/contracts Version ^12.0 || ^13.0
illuminate/database Version ^12.0 || ^13.0
illuminate/http Version ^12.0 || ^13.0
illuminate/routing Version ^12.0 || ^13.0
illuminate/support Version ^12.0 || ^13.0