Overview

Namespaces

  • Autarky
    • Config
      • Loaders
    • Console
    • Container
      • Exception
      • Factory
      • Proxy
    • Database
    • Errors
    • Events
    • Files
    • Http
    • Logging
    • Providers
    • Routing
      • Events
    • Testing
    • TwigTemplating
      • Extensions
    • Utils

Classes

  • ChannelManager
  • DefaultLogConfigurator
  • LoggingErrorHandler
  • LoggingProvider
  • Overview
  • Namespace
  • Class

Class ChannelManager

Manager of logging channels.

Psr\Log\AbstractLogger
Extended by Autarky\Logging\ChannelManager implements Psr\Log\LoggerInterface
Namespace: Autarky\Logging
Located at Logging/ChannelManager.php
Methods summary
public
# __construct( string $defaultChannel = 'default' )

Constructor.

Constructor.

Parameters

$defaultChannel
public
# setDefaultChannel( string $channel )

Change the default channel.

Change the default channel.

Parameters

$channel
public string
# getDefaultChannelName( )

Get the name of the default channel.

Get the name of the default channel.

Returns

string
public
# setChannel( string $channel, Psr\Log\LoggerInterface $logger )

Set a channel instance.

Set a channel instance.

Parameters

$channel
$logger

Throws

InvalidArgumentException
If the channel is already defined.
public
# setDeferredChannel( string $channel, callable $callback )

Define a deferred channel. The callback will be invoked and the return value passed to setChannel. The return value must implement Psr\Log\LoggerInterface.

Define a deferred channel. The callback will be invoked and the return value passed to setChannel. The return value must implement Psr\Log\LoggerInterface.

Parameters

$channel
$callback
Callback that takes no arguments

Throws

InvalidArgumentException
If the channel is already defined.
public Psr\Log\LoggerInterface
# getChannel( string $channel = null )

Get a specific channel.

Get a specific channel.

Parameters

$channel
Optional - if none, use default channel

Returns

Psr\Log\LoggerInterface

Throws

InvalidArgumentException
If the channel is not defined.
public
# log( $level, $message, array $context = array() )
Properties summary
protected string $defaultChannel

The name of the default channel to use.

The name of the default channel to use.

#
protected Psr\Log\LoggerInterface $channels

The defined channels.

The defined channels.

# []
protected callable[] $deferredChannels

The deferred channel callbacks.

The deferred channel callbacks.

# []
Autarky Framework API documentation generated by ApiGen