Property | Type | Description | |
---|---|---|---|
$config | |||
$contextCb | |||
$log | |||
$messageCb | |||
$subjectCb |
Method | Description | |
---|---|---|
__construct ( |
You can provide a Monolog Logger instance to use in the constructor | |
getContext ( Exception $e, $context = [] ) : array | Returns the result of the context closure | |
getMessage ( Exception $e ) : string | Returns the result of the message closure | |
getMessageViaCallback ( Exception $e ) : String | false | Gets the Exception message using a callback if it is set | |
getMessageViaDefault ( Exception $e ) : String | Gets a basic Exception message | |
getMessageViaView ( Exception $e ) : String | false | Gets the Exception message using a Laravel view file | |
getSubject ( Exception $e ) : string | Returns the result of the subject closure | |
pushHandler ( Monolog\Handler\HandlerInterface $handler ) : |
Pushes on another Monolog Handler | |
send ( Exception $e, array $context = [] ) : boolean | Triggers the Monolog Logger instance to log an error to all handlers | |
setContext ( callable | array $cb ) | Set an array or a closure to be called that will generate the context array for the notification | |
setMessage ( callable | string $cb ) | Set a string or a closure to be called that will generate the message body for the notification | |
setSubject ( callable | string $cb ) | Set a string or a closure to be called that will generate the subject line for the notification |
Method | Description | |
---|---|---|
wrapValueInClosure ( callable | string $cb ) : callable | Transforms a value into a closure that returns itself when called |
public __construct ( |
||
$log | Logger instance to use |
public getContext ( Exception $e, $context = [] ) : array | ||
$e | Exception | The Exception instance that you want to build the context around |
return | array | The context array |
public getMessage ( Exception $e ) : string | ||
$e | Exception | The Exception instance that you want to build the message around |
return | string | The message string |
public getMessageViaCallback ( Exception $e ) : String | false | ||
$e | Exception | The Exception instance that you want to build the message around |
return | String | false | Returns the message string or false |
public getMessageViaDefault ( Exception $e ) : String | ||
$e | Exception | The Exception instance that you want to build the message around |
return | String | Returns the message string |
public getMessageViaView ( Exception $e ) : String | false | ||
$e | Exception | The Exception instance that you want to build the message around |
return | String | false | Returns the message string or false |
public getSubject ( Exception $e ) : string | ||
$e | Exception | The Exception instance that you want to build the subject around |
return | string | The subject string |
public pushHandler ( Monolog\Handler\HandlerInterface $handler ) : |
||
$handler | Monolog\Handler\HandlerInterface | The handler instance to add on |
return | Returns this |
public setContext ( callable | array $cb ) | ||
$cb | callable | array | A closure or array that will be set for the context |
public setMessage ( callable | string $cb ) | ||
$cb | callable | string | A closure or string that will be set for the message |
public setSubject ( callable | string $cb ) | ||
$cb | callable | string | A closure or string that will be set for the subject line |