HasCommandLogger

Trait

Resolves the logger expected by command result helper traits.

Description

The trait caches the shared logger lazily so consuming commands do not need to carry constructor wiring for internal logging helpers.

Table of Contents

Properties

$logger

Caches the logger resolved for the consuming command.

 : LoggerInterface|null

Methods

getLogger()

Returns the logger configured for the consuming command.

 : LoggerInterface
Properties

$logger

Private

Caches the logger resolved for the consuming command.

private LoggerInterface|null $logger = null
Methods

getLogger()

Public

Returns the logger configured for the consuming command.

public getLogger() : LoggerInterface
Return values
LoggerInterface