1 | <?php |
||
17 | class LoggerFactory |
||
18 | { |
||
19 | /** @var LoggerInterface[] */ |
||
20 | static private $loggers = array(); |
||
21 | |||
22 | private $loggersChannel; |
||
23 | |||
24 | private $debug = false; |
||
25 | |||
26 | public function __construct(array $channel = array()) |
||
30 | |||
31 | /** |
||
32 | * @param null|\Xiidea\EasyAuditBundle\Entity\BaseAuditLog $eventInfo |
||
33 | */ |
||
34 | public function executeLoggers($eventInfo) |
||
46 | |||
47 | /** |
||
48 | * @param string $loggerName |
||
49 | * @param LoggerInterface $logger |
||
50 | * @throws InvalidServiceException |
||
51 | */ |
||
52 | public function addLogger($loggerName, $logger) |
||
60 | |||
61 | /** |
||
62 | * @param string $id |
||
63 | * @param string $level |
||
64 | * @return bool |
||
65 | */ |
||
66 | private function isChannelRegisterWithLogger($id, $level) |
||
82 | |||
83 | /** |
||
84 | * @param string $type |
||
85 | * @param string $id |
||
86 | * @return bool |
||
87 | */ |
||
88 | private function isChannelTypeOf($type, $id) |
||
92 | |||
93 | /** |
||
94 | * @param string $level |
||
95 | * @param string $id |
||
96 | * @return bool |
||
97 | */ |
||
98 | private function levelExistsInList($level, $id) |
||
102 | |||
103 | /** |
||
104 | * @param BaseAuditLog $eventInfo |
||
105 | * @param $logger |
||
106 | * @param $id |
||
107 | * @return bool |
||
108 | */ |
||
109 | protected function isValidLoggerForThisEvent(BaseAuditLog $eventInfo, $logger, $id) |
||
113 | |||
114 | /** |
||
115 | * @param mixed $debug |
||
116 | */ |
||
117 | public function setDebug($debug) |
||
121 | } |
||
122 |