Autarky\Logging\ChannelManager::setDeferredChannel PHP Method

setDeferredChannel() public method

Define a deferred channel. The callback will be invoked and the return value passed to setChannel. The return value must implement Psr\Log\LoggerInterface.
public setDeferredChannel ( string $channel, callable $callback )
$channel string
$callback callable Callback that takes no arguments
    public function setDeferredChannel($channel, callable $callback)
    {
        if (isset($this->channels[$channel])) {
            throw new InvalidArgumentException("Channel {$channel} is already defined");
        }
        $this->deferredChannels[$channel] = $callback;
    }