Skip to main content
The PHP SDK uses the PSR-3 LoggerInterface standard. Pass any PSR-3 compatible logger to NexusConfig::$logger. When $logger is null (the default), all SDK log output is suppressed.

Configuration

What the SDK logs

The SDK never logs the raw API key. Key references in log messages use the type only (e.g. key_type=sk).

Monolog example

Monolog is the most common PSR-3 implementation in PHP:
To route SDK logs to a dedicated channel:

Symfony Dependency Injection

In a Symfony application, inject the LoggerInterface via DI:
Or in a factory service:

Laravel

In Laravel, pass a channel-specific logger using Log::channel:
Add a nexus channel to config/logging.php:

Silencing SDK logs

If you want the SDK to produce no output at all, pass a NullLogger:
NullLogger is part of psr/log which Guzzle already requires transitively, so no additional dependency is needed. Alternatively, leave $logger as null (the default) - the SDK omits all logging in that case.