Magento Extensions Rating 2024
EXTENSIONS BY CATEGORY
B2B (Business-To-Business)
Blog
Customer
ERP (Enterprise Resource Planning)
Mega Menu
One Step Checkout
Order
POS (Point Of Sale)
Search
Shopping Cart
Sitemap
SEO
Social
Stock & Inventory Management
EXTENSIONS BY DEVELOPER
aheadWorks
Amasty
Boost My Shop
BSS Commerce
Magestore
MageWorx
Mirasvit
Templates Master
Wyomind
XTENTO
Magento 2 Documentation
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
vendor
magento
zendframework1
library
Zend
Log
Writer
ZendMonitor.php
Go to the documentation of this file.
1
<?php
24
#require_once 'Zend/Log/Writer/Abstract.php';
25
34
class
Zend_Log_Writer_ZendMonitor
extends
Zend_Log_Writer_Abstract
35
{
41
protected
$_isEnabled
=
true
;
42
48
protected
$_isZendServer
=
false
;
49
53
public
function
__construct
()
54
{
55
if
(!
function_exists
(
'monitor_custom_event'
)) {
56
$this->_isEnabled =
false
;
57
}
58
if
(
function_exists
(
'zend_monitor_custom_event'
)) {
59
$this->_isZendServer =
true
;
60
}
61
}
62
69
static
public
function
factory
(
$config
)
70
{
71
return
new
self
();
72
}
73
83
public
function
isEnabled
()
84
{
85
return
$this->_isEnabled
;
86
}
87
94
public
function
write
($event)
95
{
96
if
(!$this->
isEnabled
()) {
97
return
;
98
}
99
100
parent::write($event);
101
}
102
109
protected
function
_write
($event)
110
{
111
$priority = $event[
'priority'
];
112
$message
= $event[
'message'
];
113
unset($event[
'priority'
], $event[
'message'
]);
114
115
if
(!empty($event)) {
116
if
($this->_isZendServer) {
117
// On Zend Server; third argument should be the event
118
zend_monitor_custom_event($priority,
$message
, $event);
119
}
else
{
120
// On Zend Platform; third argument is severity -- either
121
// 0 or 1 -- and fourth is optional (event)
122
// Severity is either 0 (normal) or 1 (severe); classifying
123
// notice, info, and debug as "normal", and all others as
124
// "severe"
125
monitor_custom_event($priority,
$message
, ($priority > 4) ? 0 : 1, $event);
126
}
127
}
else
{
128
monitor_custom_event($priority,
$message
);
129
}
130
}
131
}
Zend_Log_Writer_ZendMonitor\factory
static factory($config)
Definition:
ZendMonitor.php:69
Zend_Log_Writer_ZendMonitor\_write
_write($event)
Definition:
ZendMonitor.php:109
Zend_Log_Writer_ZendMonitor\$_isEnabled
$_isEnabled
Definition:
ZendMonitor.php:41
Zend_Log_Writer_ZendMonitor\__construct
__construct()
Definition:
ZendMonitor.php:53
Zend_Log_Writer_ZendMonitor\isEnabled
isEnabled()
Definition:
ZendMonitor.php:83
$config
$config
Definition:
fraud_order.php:17
$message
$message
Definition:
notifications.php:7
Zend_Log_Writer_ZendMonitor\$_isZendServer
$_isZendServer
Definition:
ZendMonitor.php:48
Zend_Log_Writer_ZendMonitor
Definition:
ZendMonitor.php:34
Magento\Deploy\Console\Command\function_exists
function_exists($func)
Definition:
FunctionExistMock.php:13
Zend_Log_Writer_ZendMonitor\write
write($event)
Definition:
ZendMonitor.php:94
Zend_Log_Writer_Abstract
Definition:
Abstract.php:34