Plop
A simple logging library for PHP
LoggerInterface.php
1 <?php
2 /*
3  This file is part of Plop, a simple logging library for PHP.
4 
5  Copyright © 2010-2014 François Poirotte
6 
7  Plop is free software: you can redistribute it and/or modify
8  it under the terms of the GNU General Public License as published by
9  the Free Software Foundation, either version 3 of the License, or
10  (at your option) any later version.
11 
12  Plop is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  GNU General Public License for more details.
16 
17  You should have received a copy of the GNU General Public License
18  along with Plop. If not, see <http://www.gnu.org/licenses/>.
19 */
20 
21 namespace Plop;
22 
27 interface LoggerInterface
28 {
37  public function getLevel();
38 
51  public function setLevel($level);
52 
65  public function isEnabledFor($level);
66 
78  public function getNamespace();
79 
91  public function getClass();
92 
105  public function getMethod();
106 
114  public function getRecordFactory();
115 
126  public function setRecordFactory(\Plop\RecordFactoryInterface $factory);
127 
135  public function getFilters();
136 
148  public function setFilters(\Plop\FiltersCollectionAbstract $filters);
149 
157  public function getHandlers();
158 
170  public function setHandlers(\Plop\HandlersCollectionAbstract $handlers);
171 
191  public function debug(
192  $msg,
193  array $args = array(),
194  \Exception $exception = null
195  );
196 
216  public function info(
217  $msg,
218  array $args = array(),
219  \Exception $exception = null
220  );
221 
241  public function notice(
242  $msg,
243  array $args = array(),
244  \Exception $exception = null
245  );
246 
266  public function warning(
267  $msg,
268  array $args = array(),
269  \Exception $exception = null
270  );
271 
291  public function warn(
292  $msg,
293  array $args = array(),
294  \Exception $exception = null
295  );
296 
316  public function error(
317  $msg,
318  array $args = array(),
319  \Exception $exception = null
320  );
321 
341  public function critical(
342  $msg,
343  array $args = array(),
344  \Exception $exception = null
345  );
346 
366  public function alert(
367  $msg,
368  array $args = array(),
369  \Exception $exception = null
370  );
371 
391  public function emergency(
392  $msg,
393  array $args = array(),
394  \Exception $exception = null
395  );
396 
423  public function exception(
424  $msg,
425  \Exception $exception,
426  array $args = array()
427  );
428 
472  public function log(
473  $level,
474  $msg,
475  array $args = array(),
476  \Exception $exception = null
477  );
478 }
An interface for a factory that produces instances that implement the Plop::RecordInterface interface...
Abstract class for a collection of filters.
Interface for a logger.
This exception is thrown by Plop whenever a problem is detected.
Definition: Exception.php:30
Interface for a collection of handlers.