Method | Description | |
---|---|---|
__call ( $name, $arguments ) : mixed | Call a method on driver instance Since we are wrapping an actual driver instance with this Logger object, we need a way to implement this magic method to forward the call to driver instance | |
__construct ( string $name, Webiny\Component\Logger\Bridge\LoggerDriverInterface $driverInstance ) : |
Create new logger using given name and driver. A name is used to identify log messages from different loggers. Having two loggers ("Payment Gateway" and "Invoice Payment") would result in the following output: [Payment Gateway][info] Request sent. [Invoice Payment][alert] Paid invoice amount is too small. |
|
alert ( string $message, array $context = [] ) : null | Action must be taken immediately. | |
critical ( string $message, array $context = [] ) : null | Critical conditions. | |
debug ( string $message, array $context = [] ) : null | Detailed debug information. | |
emergency ( string $message, array $context = [] ) : null | System is unusable. | |
error ( string $message, array $context = [] ) : null | Runtime errors that do not require immediate action but should typically be logged and monitored. | |
info ( string $message, array $context = [] ) : null | Interesting events. | |
log ( mixed $level, string $message, array $context = [] ) : null | Logs with an arbitrary level. | |
notice ( string $message, array $context = [] ) : null | Normal but significant events. | |
warning ( string $message, array $context = [] ) : null | Exceptional occurrences that are not errors. |
public __construct ( string $name, Webiny\Component\Logger\Bridge\LoggerDriverInterface $driverInstance ) : |
||
$name | string | Logger name |
$driverInstance | Webiny\Component\Logger\Bridge\LoggerDriverInterface | |
return |