laravel-log-enhancement maintained by onramplab
Last update
2026/10/26 16:45
License
Require
- php ^8.2
- monolog/monolog ^3.4
- ramsey/uuid ^4.0.0
- illuminate/contracts ^11.0|^12.0|^13.0
- illuminate/log ^11.0|^12.0|^13.0
- illuminate/support ^11.0|^12.0|^13.0
Last update
2026/10/26 16:45
License
Require
- php ^8.2
- illuminate/contracts ^11.0|^12.0|^13.0
- illuminate/log ^11.0|^12.0|^13.0
- illuminate/support ^11.0|^12.0|^13.0
- monolog/monolog ^3.4
- ramsey/uuid ^4.0.0
Last update
2026/10/26 07:34
License
Require
- php ^8.2
- illuminate/contracts ^11.0|^12.0
- illuminate/log ^11.0|^12.0
- illuminate/support ^11.0|^12.0
- monolog/monolog ^3.4
- ramsey/uuid ^4.0.0
Last update
2026/10/26 07:34
License
Require
- php ^8.2
- illuminate/contracts ^11.0|^12.0
- illuminate/log ^11.0|^12.0
- illuminate/support ^11.0|^12.0
- monolog/monolog ^3.4
- ramsey/uuid ^4.0.0
Last update
2026/10/25 19:07
License
Require
- illuminate/contracts *
- illuminate/log *
- illuminate/support *
- ramsey/uuid ^4.0.0
- monolog/monolog ^3.4
- php >=8.1
Last update
2026/10/25 19:07
License
Require
- php >=8.1
- illuminate/contracts *
- illuminate/log *
- illuminate/support *
- monolog/monolog ^3.4
- ramsey/uuid ^4.0.0
Last update
2026/10/25 18:58
License
Require
- php >=8.1
- illuminate/contracts *
- illuminate/log *
- illuminate/support *
- monolog/monolog ^3.4
- ramsey/uuid ^4.0.0
Last update
2026/10/12 19:48
License
Require
- php ^8.2
- datadog/dd-trace ^1.4
- illuminate/contracts ^11.0|^12.0|^13.0
- illuminate/log ^11.0|^12.0|^13.0
- illuminate/support ^11.0|^12.0|^13.0
- monolog/monolog ^3.4
- ramsey/uuid ^4.0.0
Last update
2026/08/04 17:13
License
Require
- php >=7.3
- monolog/monolog ^1.12|^2.0
- ramsey/uuid ^4.0.0
Last update
2026/08/04 15:31
License
Require
- php >=7.3
- monolog/monolog ^1.12|^2.0
- ramsey/uuid ^4.0.0
Last update
2026/08/04 15:31
License
Require
- php >=7.3
- monolog/monolog ^1.12|^2.0
- ramsey/uuid ^4.0.0
Last update
2026/06/03 16:27
License
Require
- php >=7.3
- monolog/monolog ^1.12|^2.0
- ramsey/uuid ^4.0.0
Last update
2026/06/03 16:27
License
Require
- php >=7.3
- monolog/monolog ^1.12|^2.0
- ramsey/uuid ^4.0.0
Last update
2026/06/03 10:48
License
Require
- php >=7.3
- monolog/monolog ^1.12|^2.0
- ramsey/uuid ^4.0.0
Last update
2026/05/07 09:03
License
Require
- ramsey/uuid ^4.0.0
- php >=7.3
- monolog/monolog ^1.12|^2.0
Last update
2026/05/07 09:03
License
Require
- php >=7.3
- monolog/monolog ^1.12|^2.0
- ramsey/uuid ^4.0.0
Last update
2026/05/07 04:22
License
Require
- php >=7.3
- monolog/monolog ^1.12|^2.0
- ramsey/uuid ^4.0.0
Last update
2026/03/13 11:37
License
Require
- ramsey/uuid ^4.0.0
- php >=7.3
- monolog/monolog ^1.12|^2.0
Last update
2025/12/09 07:29
License
Require
- php ^8.2
- datadog/dd-trace ^1.4
- illuminate/contracts ^11.0|^12.0
- illuminate/log ^11.0|^12.0
- illuminate/support ^11.0|^12.0
- monolog/monolog ^3.4
- ramsey/uuid ^4.0.0
Last update
2025/12/09 07:14
License
Require
- php ^8.2
- datadog/dd-trace ^1.4
- illuminate/contracts ^11.0|^12.0
- illuminate/log ^11.0|^12.0
- illuminate/support ^11.0|^12.0
- monolog/monolog ^3.4
- ramsey/uuid ^4.0.0
Last update
2025/12/09 07:10
License
Require
- php ^8.2
- datadog/dd-trace ^1.4
- illuminate/contracts ^11.0|^12.0
- illuminate/log ^11.0|^12.0
- illuminate/support ^11.0|^12.0
- monolog/monolog ^3.4
- ramsey/uuid ^4.0.0
Last update
2023/09/07 11:23
License
Require
- php >=7.3
- monolog/monolog ^1.12|^2.0
- ramsey/uuid ^4.0.0
Last update
2023/09/07 11:22
License
Require
- php >=7.3
- monolog/monolog ^1.12|^2.0
- ramsey/uuid ^4.0.0
Last update
2023/09/06 09:32
License
Require
- php >=8.1
- datadog/dd-trace ^0.90.0
- illuminate/contracts *
- illuminate/log *
- illuminate/support *
- monolog/monolog ^3.4
- ramsey/uuid ^4.0.0
Last update
2023/09/06 09:32
License
Require
- php >=8.1
- datadog/dd-trace ^0.90.0
- illuminate/contracts *
- illuminate/log *
- illuminate/support *
- monolog/monolog ^3.4
- ramsey/uuid ^4.0.0
Last update
2023/09/01 12:25
License
Require
- php >=7.3
- illuminate/contracts *
- illuminate/log *
- illuminate/support *
- monolog/monolog ^3.4
- ramsey/uuid ^4.0.0
Last update
2023/09/01 11:14
License
Require
- php >=7.3
- fakerphp/faker ^1.5
- illuminate/contracts *
- illuminate/log *
- illuminate/support *
- monolog/monolog ^2.9
- ramsey/uuid ^4.0.0
Last update
2023/09/01 11:03
License
Require
- php >=7.3
- ramsey/uuid ^4.0.0
- monolog/monolog ^1.12|^2.0
Last update
2023/08/31 12:22
License
Require
- php >=7.3
- monolog/monolog ^1.12|^2.0
- ramsey/uuid ^4.0.0
Last update
2023/08/31 12:20
License
Require
- php >=7.3
- monolog/monolog ^1.12|^2.0
- ramsey/uuid ^4.0.0
Last update
2022/06/24 12:27
License
Require
- php >=7.3
- monolog/monolog ^1.12|^2.0
- ramsey/uuid ^4.0.0
Last update
2022/06/24 12:20
License
Require
- php >=7.2
- monolog/monolog ^1.12|^2.0
- ramsey/uuid ^4.0.0
Last update
2022/06/24 12:20
License
Require
- php >=7.2
- monolog/monolog ^1.12|^2.0
- ramsey/uuid ^4.0.0
laravel-log-enhancement
A library with logging enhancement. Including:
-
Overriding
Logfacade- It extends default Laravel
Logfacade with logging adding class path and tracking id into context.
- It extends default Laravel
-
LogglyHandlerclass- It extends monolog's LogglyHandler with tags support
-
DatadogHandlerclass- It supports Datadog Logs
Install
composer require onramplab/laravel-log-enhancement
- use Datadog APM to connect php logs and traces
curl -LO https://github.com/DataDog/dd-trace-php/releases/latest/download/datadog-setup.php
sudo php datadog-setup.php --php-bin=all
Usage
LoggerFacade
The log json will look like this:
{
"message": "Test",
"context": {
"class_path": "App\\Fake",
"tracking_id": "652c3456-1a17-42b8-9fa7-9bee65e655eb"
},
"level": 200,
"level_name": "INFO",
"channel": "local",
"extra": {},
"timestamp": "2021-01-04T22:47:56.598608-0800"
}
LogglyHandler
You can adding following block into config/logging.php.
use Monolog\Formatter\LogglyFormatter;
use Onramplab\LaravelLogEnhancement\Handlers\LogglyHandler;
return [
//...
'channels' => [
//...
'loggly' => [
'driver' => 'monolog',
'level' => 'info',
'handler' => LogglyHandler::class,
'handler_with' => [
'token' => env('LOGGLY_TOKEN'),
'tags' => env('LOGGLY_TAGS'),
],
'formatter' => LogglyFormatter::class,
],
]
];
DatadogHandler
You can adding following block into config/logging.php.
use Monolog\Formatter\JsonFormatter;
use Onramplab\LaravelLogEnhancement\Handlers\DatadogHandler;
return [
//...
'channels' => [
//...
'datadog' => [
'driver' => 'monolog',
'level' => 'info',
'handler' => DatadogHandler::class,
'handler_with' => [
'key' => env('DD_LOG_API_KEY'),
'region' => env('DD_LOG_REGION', 'us5'),
'attributes' => [
'hostname' => gethostname(),
'source' => env('DD_LOG_SOURCE', 'laravel'),
'service' => env('DD_LOG_SERVICE'),
'tags' => env('DD_LOG_TAG'),
],
],
'formatter' => JsonFormatter::class,
],
]
];
Testing
Run the tests with:
vendor/bin/phpunit
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security-related issues, please email kos.huang@onramplab.com instead of using the issue tracker.
License
The MIT License (MIT). Please see License File for more information.# laravel-log-enhancement