class Illuminate / Log / LogManager

LogManager

Implements

  • Psr\...\LoggerInterface

Uses

Properties

protected

$app Application

The application instance.

Default: null
protected

$channels array

The array of resolved channels.

Default: []
protected

$sharedContext array

The context shared across channels and stacks.

Default: []
protected

$customCreators array

The registered custom driver creators.

Default: []
protected

$dateFormat string

The standard date format to use when writing logs.

Default: 'Y-m-d H:i:s'

Methods

public

__construct ( $app ) : void

Create a new Log manager instance.

Parameters

public

build ( array $config ) : Psr\...\LoggerInterface

Build an on-demand log channel.

Parameters

  • $config array
public

stack ( array $channels , $channel ) : Psr\...\LoggerInterface

Create a new, on-demand aggregate logger instance.

Parameters

  • $channels array
  • $channel string|null
public

channel ( $channel ) : Psr\...\LoggerInterface

Get a log channel instance.

Parameters

  • $channel string|null
public

driver ( $driver ) : Psr\...\LoggerInterface

Get a log driver instance.

Parameters

  • $driver string|null
protected

get ( $name , array $config ) : Psr\...\LoggerInterface

Attempt to get the log from the local cache.

Parameters

  • $name string
  • $config array|null
protected

tap ( $name , Logger $logger ) : Logger

Apply the configured taps for the logger.

Parameters

protected

parseTap ( $tap ) : array

Parse the given tap class string into a class name and arguments string.

Parameters

  • $tap string
protected

createEmergencyLogger ( ) : Psr\...\LoggerInterface

Create an emergency log handler to avoid white screens of death.

protected

resolve ( $name , array $config ) : Psr\...\LoggerInterface

Resolve the given log instance by name.

Parameters

  • $name string
  • $config array|null
protected

callCustomCreator ( array $config ) : mixed

Call a custom driver creator.

Parameters

  • $config array
protected

createCustomDriver ( array $config ) : Psr\...\LoggerInterface

Create a custom log driver instance.

Parameters

  • $config array
protected

createStackDriver ( array $config ) : Psr\...\LoggerInterface

Create an aggregate log driver instance.

Parameters

  • $config array
protected

createSingleDriver ( array $config ) : Psr\...\LoggerInterface

Create an instance of the single file log driver.

Parameters

  • $config array
protected

createDailyDriver ( array $config ) : Psr\...\LoggerInterface

Create an instance of the daily file log driver.

Parameters

  • $config array
protected

createSlackDriver ( array $config ) : Psr\...\LoggerInterface

Create an instance of the Slack log driver.

Parameters

  • $config array
protected

createSyslogDriver ( array $config ) : Psr\...\LoggerInterface

Create an instance of the syslog log driver.

Parameters

  • $config array
protected

createErrorlogDriver ( array $config ) : Psr\...\LoggerInterface

Create an instance of the "error log" log driver.

Parameters

  • $config array
protected

createMonologDriver ( array $config ) : Psr\...\LoggerInterface

Create an instance of any handler available in Monolog.

Parameters

  • $config array
protected

prepareHandlers ( array $handlers ) : array

Prepare the handlers for usage by Monolog.

Parameters

  • $handlers array
protected

prepareHandler ( Monolog\...\HandlerInterface $handler , array $config ) : Monolog\...\HandlerInterface

Prepare the handler for usage by Monolog.

Parameters

  • $handler Monolog\...\HandlerInterface
  • $config array
protected

formatter ( ) : Monolog\...\FormatterInterface

Get a Monolog formatter instance.

public

shareContext ( array $context ) : $this

Share context across channels and stacks.

Parameters

  • $context array
public

sharedContext ( ) : array

The context shared across channels and stacks.

public

flushSharedContext ( ) : $this

Flush the shared context.

protected

getFallbackChannelName ( ) : string

Get fallback log channel name.

protected

configurationFor ( $name ) : array

Get the log connection configuration.

Parameters

  • $name string
public

getDefaultDriver ( ) : string|null

Get the default log driver name.

public

setDefaultDriver ( $name ) : void

Set the default log driver name.

Parameters

  • $name string
public

extend ( $driver , Closure $callback ) : $this

Register a custom driver creator Closure.

Parameters

public

forgetChannel ( $driver ) : void

Unset the given channel instance.

Parameters

  • $driver string|null
protected

parseDriver ( $driver ) : string|null

Parse the driver name.

Parameters

  • $driver string|null
public

getChannels ( ) : array

Get all of the resolved log channels.

public

emergency ( $message , array $context ) : void

System is unusable.

Parameters

  • $message string
  • $context array
public

alert ( $message , array $context ) : void

Action must be taken immediately.

Parameters

  • $message string
  • $context array
public

critical ( $message , array $context ) : void

Critical conditions.

Parameters

  • $message string
  • $context array
public

error ( $message , array $context ) : void

Runtime errors that do not require immediate action but should typically be logged and monitored.

Parameters

  • $message string
  • $context array
public

warning ( $message , array $context ) : void

Exceptional occurrences that are not errors.

Parameters

  • $message string
  • $context array
public

notice ( $message , array $context ) : void

Normal but significant events.

Parameters

  • $message string
  • $context array
public

info ( $message , array $context ) : void

Interesting events.

Parameters

  • $message string
  • $context array
public

debug ( $message , array $context ) : void

Detailed debug information.

Parameters

  • $message string
  • $context array
public

log ( $level , $message , array $context ) : void

Logs with an arbitrary level.

Parameters

  • $level mixed
  • $message string
  • $context array
public

__call ( $method , $parameters ) : mixed

Dynamically call the default driver instance.

Parameters

  • $method string
  • $parameters array