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
magento2-functional-testing-framework
src
Magento
FunctionalTestingFramework
Util
Logger
LoggingUtil.php
Go to the documentation of this file.
1
<?php
7
namespace
Magento\FunctionalTestingFramework\Util\Logger
;
8
9
use Monolog\Handler\StreamHandler;
10
use Monolog\Logger;
11
12
class
LoggingUtil
13
{
19
private
$loggers = [];
20
26
private
static
$INSTANCE;
27
33
public
static
function
getInstance
()
34
{
35
if
(self::$INSTANCE ==
null
) {
36
self::$INSTANCE =
new
LoggingUtil
();
37
}
38
39
return
self::$INSTANCE;
40
}
41
45
private
function
__construct()
46
{
47
// private constructor
48
}
49
58
public
function
getLogger
($clazz)
59
{
60
if
($clazz ==
null
) {
61
throw
new \Exception(
"You must pass a class to receive a logger"
);
62
}
63
64
if
(!array_key_exists($clazz, $this->loggers)) {
65
$logger
=
new
MftfLogger
($clazz);
66
$logger
->pushHandler(
new
StreamHandler($this->
getLoggingPath
()));
67
$this->loggers[$clazz] =
$logger
;
68
}
69
70
return
$this->loggers[$clazz];
71
}
72
78
public
function
getLoggingPath
()
79
{
80
return
TESTS_BP . DIRECTORY_SEPARATOR .
"mftf.log"
;
81
}
82
}
Magento\FunctionalTestingFramework\Util\Logger
Definition:
LoggingUtil.php:7
Magento\FunctionalTestingFramework\Util\Logger\LoggingUtil
Definition:
LoggingUtil.php:12
$logger
$logger
Definition:
health_check.php:20
Magento\FunctionalTestingFramework\Util\Logger\MftfLogger
Definition:
MftfLogger.php:13
Magento\FunctionalTestingFramework\Util\Logger\LoggingUtil\getInstance
static getInstance()
Definition:
LoggingUtil.php:33
Magento\FunctionalTestingFramework\Util\Logger\LoggingUtil\getLoggingPath
getLoggingPath()
Definition:
LoggingUtil.php:78
Magento\FunctionalTestingFramework\Util\Logger\LoggingUtil\getLogger
getLogger($clazz)
Definition:
LoggingUtil.php:58