LogManager
Implements
- Psr\...\LoggerInterface
Uses
Properties
$channels array
The array of resolved channels.
$customCreators array
The registered custom driver creators.
$dateFormat string
The standard date format to use when writing logs.
Methods
build ( array $config ) : Psr\...\LoggerInterface
Build an on-demand log channel.
Parameters
- $config array
stack ( array $channels , $channel ) : Psr\...\LoggerInterface
Create a new, on-demand aggregate logger instance.
Parameters
- $channels array
- $channel string|null
channel ( $channel ) : Psr\...\LoggerInterface
Get a log channel instance.
Parameters
- $channel string|null
driver ( $driver ) : Psr\...\LoggerInterface
Get a log driver instance.
Parameters
- $driver string|null
get ( $name , array $config ) : Psr\...\LoggerInterface
Attempt to get the log from the local cache.
Parameters
- $name string
- $config array|null
tap ( $name , Logger $logger ) : Logger
Apply the configured taps for the logger.
Parameters
- $name string
- $logger Logger
parseTap ( $tap ) : array
Parse the given tap class string into a class name and arguments string.
Parameters
- $tap string
createEmergencyLogger ( ) : Psr\...\LoggerInterface
Create an emergency log handler to avoid white screens of death.
resolve ( $name , array $config ) : Psr\...\LoggerInterface
Resolve the given log instance by name.
Parameters
- $name string
- $config array|null
callCustomCreator ( array $config ) : mixed
Call a custom driver creator.
Parameters
- $config array
createCustomDriver ( array $config ) : Psr\...\LoggerInterface
Create a custom log driver instance.
Parameters
- $config array
createStackDriver ( array $config ) : Psr\...\LoggerInterface
Create an aggregate log driver instance.
Parameters
- $config array
createSingleDriver ( array $config ) : Psr\...\LoggerInterface
Create an instance of the single file log driver.
Parameters
- $config array
createDailyDriver ( array $config ) : Psr\...\LoggerInterface
Create an instance of the daily file log driver.
Parameters
- $config array
createSlackDriver ( array $config ) : Psr\...\LoggerInterface
Create an instance of the Slack log driver.
Parameters
- $config array
createSyslogDriver ( array $config ) : Psr\...\LoggerInterface
Create an instance of the syslog log driver.
Parameters
- $config array
createErrorlogDriver ( array $config ) : Psr\...\LoggerInterface
Create an instance of the "error log" log driver.
Parameters
- $config array
createMonologDriver ( array $config ) : Psr\...\LoggerInterface
Create an instance of any handler available in Monolog.
Parameters
- $config array
prepareHandlers ( array $handlers ) : array
Prepare the handlers for usage by Monolog.
Parameters
- $handlers array
prepareHandler ( Monolog\...\HandlerInterface $handler , array $config ) : Monolog\...\HandlerInterface
Prepare the handler for usage by Monolog.
Parameters
- $handler Monolog\...\HandlerInterface
- $config array
formatter ( ) : Monolog\...\FormatterInterface
Get a Monolog formatter instance.
getFallbackChannelName ( ) : string
Get fallback log channel name.
configurationFor ( $name ) : array
Get the log connection configuration.
Parameters
- $name string
getDefaultDriver ( ) : string|null
Get the default log driver name.
setDefaultDriver ( $name ) : void
Set the default log driver name.
Parameters
- $name string
extend ( $driver , Closure $callback ) : $this
Register a custom driver creator Closure.
Parameters
- $driver string
- $callback Closure
forgetChannel ( $driver ) : $this
Unset the given channel instance.
Parameters
- $driver string|null
parseDriver ( $driver ) : string|null
Parse the driver name.
Parameters
- $driver string|null
getChannels ( ) : array
Get all of the resolved log channels.
emergency ( $message , array $context ) : void
System is unusable.
Parameters
- $message string
- $context array
alert ( $message , array $context ) : void
Action must be taken immediately.
Parameters
- $message string
- $context array
critical ( $message , array $context ) : void
Critical conditions.
Parameters
- $message string
- $context array
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
warning ( $message , array $context ) : void
Exceptional occurrences that are not errors.
Parameters
- $message string
- $context array
notice ( $message , array $context ) : void
Normal but significant events.
Parameters
- $message string
- $context array
info ( $message , array $context ) : void
Interesting events.
Parameters
- $message string
- $context array
debug ( $message , array $context ) : void
Detailed debug information.
Parameters
- $message string
- $context array
log ( $level , $message , array $context ) : void
Logs with an arbitrary level.
Parameters
- $level mixed
- $message string
- $context array
__call ( $method , $parameters ) : mixed
Dynamically call the default driver instance.
Parameters
- $method string
- $parameters array