ExceptionLogLevel
in package
FinalYes
The ExceptionLogLevel attribute.
Annotate your methods with the ExceptionLogLevel
attribute and, in case of exception in the method, the exception
will be logged with the specified log level by the Laravel exception handler.
If the same exception type are annotated at multiple locations on the execution path, the log level will be the higher layer's one.
Attributes
- #[Attribute]
- \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE
Table of Contents
Properties
Methods
- __construct() : mixed
- Create a new instance.
Properties
$level read-only
public
string
$level
$type read-only
public
string
$type
Methods
__construct()
Create a new instance.
public
__construct(Throwable> $type, LogLevel::* $level) : mixed
Parameters
- $type : Throwable>
-
The exception type
- $level : LogLevel::*
-
The log level