InvergeDocs
PHPAPI reference

Monolog handler

Monolog handler in the PHP SDK.

// access
new NexusLogHandler($nexus)

NexusLogHandler

class
class Inverge\Nexus\Monolog\NexusLogHandler

A Monolog handler that forwards your app's logs to Nexus Logs — and, when a record carries a \Throwable in its context (as Laravel and Symfony do for unhandled exceptions), reports it to Nexus Errors too.

Log lines are buffered and delivered in one batch when the buffer fills or on shutdown, so logging never adds a request per line. Pass a queue-backed NexusClient to move delivery off the request entirely.

Requires monolog/monolog ^3.

View source

__construct

constructor
function __construct(Inverge\Nexus\NexusClient $nexus, bool $captureExceptions = true, int $flushAt = 50, Monolog\Level|string|int $level = Monolog\Level::Debug, bool $bubble = true)

Parameters

Prop

Type

View source

close()

method
function close(): void
View source

On this page