source: trunk/src/inc/LogHandler.class.php@ 7631

Last change on this file since 7631 was 7631, checked in by Pieter Naber, 13 years ago

Fixed a lot of bugs, introduced KMLFile::parseFile for parsing the node status file

File size: 2.2 KB
Line 
1<?
2/*
3 * Project: NodeMap2.0
4 * File: LogHandler.class.php
5 * Purpose: Handling our log file containing log entries generated by the application
6 */
7
8/*
9 * Log levels:
10 * LOG_EMERG System is unusable
11 * LOG_ALERT Action must be taken immediately
12 * LOG_CRIT Critical conditions
13 * LOG_ERR Error conditions
14 * LOG_WARNING Warning conditions
15 * LOG_NOTICE Normal, but significant, condition
16 * LOG_INFO Informational message
17 * LOG_DEBUG Debug-level message
18 */
19
20class LogHandler {
21 /*
22 * Function: LogHandler
23 * Parameters: int $logno, string $logstr, string $logfile, int $logline
24 * Function: Handling with log entries, decides what to do with it
25 */
26 public function LogHandler(int $logno, string $logstr, string $logfile, int $logline) {
27 switch ($logno) {
28 case LOG_EMERG:
29 echo 'LOG_EMERG: ' , $logno , ': ' , $logstr , '<br/>Bestand: ' , $logfile , '<br/>Regel: ' , $logline , '<br/>';
30 // TODO
31 break;
32 case LOG_ALERT:
33 echo 'LOG_ALERT: ' , $logno , ': ' , $logstr , '<br/>Bestand: ' , $logfile , '<br/>Regel: ' , $logline , '<br/>';
34 // TODO
35 break;
36 case LOG_CRIT:
37 echo 'LOG_CRIT: ' , $logno , ': ' , $logstr , '<br/>Bestand: ' , $logfile , '<br/>Regel: ' , $logline , '<br/>';
38 // TODO
39 break;
40 case LOG_ERR:
41 echo 'LOG_ERR: ' , $logno , ': ' , $logstr , '<br/>Bestand: ' , $logfile , '<br/>Regel: ' , $logline , '<br/>';
42 // TODO
43 break;
44 case LOG_WARNING:
45 echo 'LOG_WARNING: ' , $logno , ': ' , $logstr , '<br/>Bestand: ' , $logfile , '<br/>Regel: ' , $logline , '<br/>';
46 // TODO
47 break;
48 case LOG_NOTICE:
49 echo 'LOG_NOTICE: ' , $logno , ': ' , $logstr , '<br/>Bestand: ' , $logfile , '<br/>Regel: ' , $logline , '<br/>';
50 // TODO
51 break;
52 case LOG_INFO:
53 echo 'LOG_INFO: ' , $logno , ': ' , $logstr , '<br/>Bestand: ' , $logfile , '<br/>Regel: ' , $logline , '<br/>';
54 // TODO
55 break;
56 case LOG_DEBUG:
57 echo 'LOG_DEBUG: ' , $logno , ': ' , $logstr , '<br/>Bestand: ' , $logfile , '<br/>Regel: ' , $logline , '<br/>';
58 // TODO
59 break;
60 default:
61 echo 'LOG_DEFAULT: ' , $logno , ': ' , $logstr , '<br/>Bestand: ' , $logfile , '<br/>Regel: ' , $logline , '<br/>';
62 // TODO
63 break;
64 }
65 }
66}
67?>
Note: See TracBrowser for help on using the repository browser.