Logger
Implements
- Psr\...\LoggerInterface
Uses
Properties
$logger Psr\...\LoggerInterface
The underlying logger implementation.
$context array
Any context to be added to logs.
Methods
__construct ( Psr\...\LoggerInterface $logger , Dispatcher $dispatcher ) : void
Create a new log writer instance.
Parameters
- $logger Psr\...\LoggerInterface
- $dispatcher Dispatcher |null
emergency ( $message , array $context ) : void
Log an emergency message to the logs.
Parameters
- $message Illuminate\...\Arrayable|Jsonable |Stringable |array|string
- $context array
alert ( $message , array $context ) : void
Log an alert message to the logs.
Parameters
- $message Illuminate\...\Arrayable|Jsonable |Stringable |array|string
- $context array
critical ( $message , array $context ) : void
Log a critical message to the logs.
Parameters
- $message Illuminate\...\Arrayable|Jsonable |Stringable |array|string
- $context array
error ( $message , array $context ) : void
Log an error message to the logs.
Parameters
- $message Illuminate\...\Arrayable|Jsonable |Stringable |array|string
- $context array
warning ( $message , array $context ) : void
Log a warning message to the logs.
Parameters
- $message Illuminate\...\Arrayable|Jsonable |Stringable |array|string
- $context array
notice ( $message , array $context ) : void
Log a notice to the logs.
Parameters
- $message Illuminate\...\Arrayable|Jsonable |Stringable |array|string
- $context array
info ( $message , array $context ) : void
Log an informational message to the logs.
Parameters
- $message Illuminate\...\Arrayable|Jsonable |Stringable |array|string
- $context array
debug ( $message , array $context ) : void
Log a debug message to the logs.
Parameters
- $message Illuminate\...\Arrayable|Jsonable |Stringable |array|string
- $context array
log ( $level , $message , array $context ) : void
Log a message to the logs.
Parameters
- $level string
- $message Illuminate\...\Arrayable|Jsonable |Stringable |array|string
- $context array
write ( $level , $message , array $context ) : void
Dynamically pass log calls into the writer.
Parameters
- $level string
- $message Illuminate\...\Arrayable|Jsonable |Stringable |array|string
- $context array
writeLog ( $level , $message , $context ) : void
Write a message to the log.
Parameters
- $level string
- $message Illuminate\...\Arrayable|Jsonable |Stringable |array|string
- $context array
withContext ( array $context ) : $this
Add context to all future logs.
Parameters
- $context array
withoutContext ( ) : $this
Flush the existing context array.
listen ( Closure $callback ) : void
Register a new callback handler for when a log event is triggered.
Parameters
- $callback Closure
fireLogEvent ( $level , $message , array $context ) : void
Fires a log event.
Parameters
- $level string
- $message string
- $context array
formatMessage ( $message ) : string
Format the parameters for the logger.
Parameters
- $message Illuminate\...\Arrayable|Jsonable |Stringable |array|string
getLogger ( ) : Psr\...\LoggerInterface
Get the underlying logger implementation.
setEventDispatcher ( Dispatcher $dispatcher ) : void
Set the event dispatcher instance.
Parameters
- $dispatcher Dispatcher
__call ( $method , $parameters ) : mixed
Dynamically proxy method calls to the underlying logger.
Parameters
- $method string
- $parameters array