File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
app/code/Magento/NewRelicReporting/Plugin Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change 9
9
use Magento \Framework \Exception \LocalizedException ;
10
10
use Magento \NewRelicReporting \Model \Config ;
11
11
use Magento \NewRelicReporting \Model \NewRelicWrapper ;
12
+ use Psr \Log \LoggerInterface ;
12
13
13
14
class StatePlugin
14
15
{
@@ -22,16 +23,23 @@ class StatePlugin
22
23
*/
23
24
private $ newRelicWrapper ;
24
25
26
+ /**
27
+ * @var LoggerInterface
28
+ */
29
+ private $ logger ;
30
+
25
31
/**
26
32
* @param Config $config
27
33
* @param NewRelicWrapper $newRelicWrapper
28
34
*/
29
35
public function __construct (
30
36
Config $ config ,
31
- NewRelicWrapper $ newRelicWrapper
37
+ NewRelicWrapper $ newRelicWrapper ,
38
+ LoggerInterface $ logger
32
39
) {
33
40
$ this ->config = $ config ;
34
41
$ this ->newRelicWrapper = $ newRelicWrapper ;
42
+ $ this ->logger = $ logger ;
35
43
}
36
44
37
45
/**
@@ -52,6 +60,7 @@ public function afterSetAreaCode(State $state, $result)
52
60
try {
53
61
$ this ->newRelicWrapper ->setAppName ($ this ->appName ($ state ));
54
62
} catch (LocalizedException $ e ) {
63
+ $ this ->logger ->critical ($ e );
55
64
return ;
56
65
}
57
66
}
You can’t perform that action at this time.
0 commit comments