Search by

verulon / monolog-handler

Monolog handler that ships log records to Verulon's application log ingestion endpoint.

Maintainers

Package info

github.com/Verulon/php-monolog-handler

Homepage

pkg:composer/verulon/monolog-handler

Transparency log

Statistics

Installs: 22

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v2.0.0 2026-09-02 14:35 UTC

This package is auto-updated.

Last update: 2026-09-03 07:35:48 UTC


README

A Monolog handler that ships log records to a Verulon application's log ingestion endpoint. Find the application UUID and token on the application's Logging tab in the Verulon dashboard.

Installation

composer require verulon/monolog-handler

Usage (Laravel)

Add a verulon channel to config/logging.php:

'verulon' => [
    'driver' => 'monolog',
    'handler' => \Verulon\Monolog\VerulonHandler::class,
    'handler_with' => [
        'applicationUuid' => env('VERULON_APPLICATION_UUID'),
        'token' => env('VERULON_LOGGING_TOKEN'),
    ],
    'level' => 'debug',
],

Add the application UUID and token to .env:

VERULON_APPLICATION_UUID=...
VERULON_LOGGING_TOKEN=...

Both are found on the application's Logging tab in the Verulon dashboard.

Then activate the channel by adding verulon to your LOG_STACK, or set it directly:

LOG_CHANNEL=verulon

or, as part of a stack:

LOG_STACK=single,verulon

Usage (framework-agnostic)

use Verulon\Monolog\VerulonHandler;
use Monolog\Logger;

$handler = new VerulonHandler(
    applicationUuid: 'your-application-uuid',
    token: 'your-token',
);

$logger = new Logger('app');
$logger->pushHandler($handler);
$logger->info('Hello, Verulon!');

Batching

This handler sends one HTTP request per log record. If you want to batch multiple records into fewer requests, wrap it in Monolog's built-in BufferHandler:

use Monolog\Handler\BufferHandler;
use Verulon\Monolog\VerulonHandler;

$handler = new BufferHandler(new VerulonHandler($applicationUuid, $token));

Failure behavior

Log shipping must never break the application producing the logs. Any failure — network error, timeout, non-2xx response — is swallowed silently by the handler.