FileStorage
class FileStorage implements ThrowableStorageInterface (View source)
Stores detailed information about throwables into files.
Properties
protected Closure | $requestInformationRenderer | ||
protected Closure | $backtraceRenderer | ||
protected string | $storagePath | ||
protected int | $maximumThrowableDumpAge | The maximum age of throwable dump in seconds, 0 to disable cleaning based on age |
|
protected int | $maximumThrowableDumpCount | The maximum number of throwable dumps to store, 0 to disable cleaning based on count |
Methods
Factory method to get an instance.
Create new instance.
Stores information about the given exception and returns information about the exception and where the details have been stored. The returned message can be logged or displayed as needed.
Generates a reference code for this specific error event to make it findable.
Get current error post mortem informations with support for error chaining
Renders background information about the circumstances of the exception.
Render information about the current request, if possible
Cleans up existing throwable dumps when they are older than the configured maximum age or the oldest ones exceeding the maximum number of dumps allowed.
Details
static ThrowableStorageInterface
createWithOptions(array $options)
Factory method to get an instance.
__construct(string $storagePath, int $maximumThrowableDumpAge, int $maximumThrowableDumpCount)
Create new instance.
ThrowableStorageInterface
setRequestInformationRenderer(Closure $requestInformationRenderer)
No description
ThrowableStorageInterface
setBacktraceRenderer(Closure $backtraceRenderer)
No description
string
logThrowable(Throwable $throwable, array $additionalData = [])
Stores information about the given exception and returns information about the exception and where the details have been stored. The returned message can be logged or displayed as needed.
The returned message follows this pattern:
Exception #``` in
protected string
generateUniqueReferenceCode()
Generates a reference code for this specific error event to make it findable.
protected string
renderErrorInfo(Throwable $error, array $additionalData = [])
Get current error post mortem informations with support for error chaining
protected string
getErrorLogMessage(Throwable $error)
No description
protected string
renderBacktrace(array $backtrace)
Renders background information about the circumstances of the exception.
protected string
renderRequestInfo()
Render information about the current request, if possible
protected void
cleanupThrowableDumps()
Cleans up existing throwable dumps when they are older than the configured maximum age or the oldest ones exceeding the maximum number of dumps allowed.