-
-
Notifications
You must be signed in to change notification settings - Fork 186
/
ThrowableStorageInterface.php
49 lines (44 loc) · 1.67 KB
/
ThrowableStorageInterface.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<?php
namespace Neos\Flow\Log;
/**
* An interface for storages that can log full exceptions and their stacktraces.
*
* @api
*/
interface ThrowableStorageInterface
{
/** TODO: Factory method to create an instance, should officially become part of the interface in next major.
*
* A factory method to create an instance of the throwable storage.
* Note that throwable storages must work without proxy so all dependencies need to be resolved manually or via options.
*
* @param array $options
* @return ThrowableStorageInterface
*/
// public static function createWithOptions(array $options): ThrowableStorageInterface;
/**
* Writes information about the given exception into the log.
*
* @param \Throwable $throwable The throwable to log
* @param array $additionalData Additional data to log
* @return string Informational message about the stored throwable
* @api
*/
public function logThrowable(\Throwable $throwable, array $additionalData = []);
/**
* Set a closure that returns information about the current request to be stored with the exception.
* Note this is not yet public API and bound to change.
*
* @param \Closure $requestInformationRenderer
* @return self
*/
public function setRequestInformationRenderer(\Closure $requestInformationRenderer);
/**
* Set a closure that takes a backtrace array and returns a representation useful for this storage.
* Note this is not yet public API and bound to change.
*
* @param \Closure $backtraceRenderer
* @return self
*/
public function setBacktraceRenderer(\Closure $backtraceRenderer);
}