Nexus API Reference

NexusLogger
in package

FinalYes
Tags
psalm-api

Fluent factory that spawns a LogActor on the given ActorSystem and returns a PSR-3 LoggerInterface bound to it. Typical usage:

$logger = NexusLogger::create($system, 'app') ->minLevel(Level::Debug) ->handler(new ConsoleHandler(STDOUT, new LineFormatter())) ->handler(new FileHandler('/var/log/app.log', new JsonFormatter())) ->build();

$logger->info('user logged in', ['userId' => 42]);

Table of Contents

Methods

build()  : LoggerInterface
channel()  : self
create()  : self
handler()  : self
minLevel()  : self
processor()  : self

Methods

build()

public build() : LoggerInterface
Return values
LoggerInterface

channel()

public channel(string $channel) : self
Parameters
$channel : string
Return values
self

create()

public static create(ActorSystem $system[, string $channel = 'app' ]) : self
Parameters
$system : ActorSystem
$channel : string = 'app'
Return values
self

        
On this page

Search results