1: <?php
2:
3: namespace HZSystem\Core\Logger\Appenders;
4:
5: use HZSystem\Core\Logger\HZLogRow;
6:
7: /*
8: * Copyright (C) 2015 Luca Liscio
9: *
10: * This program is free software: you can redistribute it and/or modify
11: * it under the terms of the GNU Affero General Public License as published by
12: * the Free Software Foundation, either version 3 of the License, or
13: * (at your option) any later version.
14: *
15: * This program is distributed in the hope that it will be useful,
16: * but WITHOUT ANY WARRANTY; without even the implied warranty of
17: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18: * GNU Affero General Public License for more details.
19: *
20: * You should have received a copy of the GNU Affero General Public License
21: * along with this program. If not, see <http://www.gnu.org/licenses/agpl-3.0.html>.
22: */
23:
24: /**
25: * Abstract appender per il Logger di sistema
26: *
27: * @author Luca Liscio <hzkight@h0model.org>
28: * @version 0.0.1 2015/11/30 01:44:20
29: * @copyright 2015 Luca Liscio
30: * @license http://www.gnu.org/licenses/agpl-3.0.html GNU/AGPL3
31: *
32: * @package hzSystem
33: * @subpackage Core\Logger\Appenders
34: * @abstract
35: * @filesource
36: */
37:
38: abstract class Appender {
39:
40: private $loglevel;
41: static $error_identifier;
42:
43: public function __construct() {
44: $this->error_identifier = array(
45: 404 => "FATAL",
46: 403 => "ERROR",
47: 402 => "WARNING",
48: 401 => "INFO",
49: 400 => "DEBUG"
50: );
51: }
52:
53: abstract public function add(HZLogRow $log_row);
54: abstract public function get_log($start=0,$stop);
55:
56: public function setLogLevel($level){
57:
58: $this->loglevel = $level;
59:
60: }
61:
62: }
63: ?>