applog / logger
logger
1.0.1
2026-07-31 22:38 UTC
Requires
- php: >=8.1
- illuminate/config: ^8|^9|^10|^11|^12
- illuminate/console: ^8|^9|^10|^11|^12
- illuminate/container: ^8|^9|^10|^11|^12
- illuminate/support: ^8|^9|^10|^11|^12
- monolog/monolog: ^3.1
Requires (Dev)
- laravel/lumen-framework: ^10
- mockery/mockery: *
- phpstan/phpstan: ^2.2
- phpunit/phpunit: ^7.4|^8.4|^9.4|^10|^11|^12
- squizlabs/php_codesniffer: ^3.8
Suggests
- applog/correlation: for get correlation id
This package is not auto-updated.
Last update: 2026-07-31 23:00:58 UTC
README
install
file bootstrap/app.php
$app->configure('applog-logger');
$app->register(\Applog\Logger\ServiceProvider::class);
file config/logging.php
add remote to channels
'channels' => [
...
'remote' => [
'driver' => 'monolog',
'level' => 'debug',
'handler' => \Applog\Logger\SocketHandlerInterface::class,
],
...
],
env
| Env | Default | Desc |
|---|---|---|
| APPLOG_LOGGER_LEVEL | 200 | min log level |
| APPLOG_LOGGER_NAME | service | service name |
| APPLOG_LOGGER_ENV | prod | ENV |
| APPLOG_LOGGER_TIMEOUT | 10 | timeout |
example ExceptionHandler
$SocketHandler = new \Applog\Logger\Handler\SocketHandler('host:8011');
$SocketHandler->setExceptionHandler(function (\Exception $e, array $record) {
echo get_class($e) . ' | ' . $e->getMessage();
});
Correlation
install package applog/log-correlation