Last change
on this file since 7622 was 7618, checked in by Pieter Naber, 15 years ago |
Eerste keer op de SVN! Twee PHP klassen aangemaakt: LogHandler en ErrorHandler. Alleen in grote lijnen neergezet, moeten verder worden uitgebreid!
|
File size:
1.4 KB
|
Rev | Line | |
---|
[7618] | 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 |
|
---|
| 20 | define('LOG_EMERG', 0);
|
---|
| 21 | define('LOG_ALERT', 1);
|
---|
| 22 | define('LOG_CRIT', 2);
|
---|
| 23 | define('LOG_ERR', 3);
|
---|
| 24 | define('LOG_WARNING', 4);
|
---|
| 25 | define('LOG_NOTICE', 5);
|
---|
| 26 | define('LOG_INFO', 6);
|
---|
| 27 | define('LOG_DEBUG', 7);
|
---|
| 28 |
|
---|
| 29 | class LogHandler {
|
---|
| 30 | /*
|
---|
| 31 | * Function: LogHandler
|
---|
| 32 | * Parameters: int $logno, string $logstr, string $logfile, int $logline
|
---|
| 33 | * Function: Handling with log entries, decides what to do with it
|
---|
| 34 | */
|
---|
| 35 | public function LogHandler(int $logno, string $logstr, string $logfile, int $logline) {
|
---|
| 36 | switch ($logno) {
|
---|
| 37 | case LOG_EMERG:
|
---|
| 38 | // TODO
|
---|
| 39 | break;
|
---|
| 40 | case LOG_ALERT:
|
---|
| 41 | // TODO
|
---|
| 42 | break;
|
---|
| 43 | case LOG_CRIT:
|
---|
| 44 | // TODO
|
---|
| 45 | break;
|
---|
| 46 | case LOG_ERR:
|
---|
| 47 | // TODO
|
---|
| 48 | break;
|
---|
| 49 | case LOG_WARNING:
|
---|
| 50 | // TODO
|
---|
| 51 | break;
|
---|
| 52 | case LOG_NOTICE:
|
---|
| 53 | // TODO
|
---|
| 54 | break;
|
---|
| 55 | case LOG_INFO:
|
---|
| 56 | // TODO
|
---|
| 57 | break;
|
---|
| 58 | case LOG_DEBUG:
|
---|
| 59 | // TODO
|
---|
| 60 | break;
|
---|
| 61 | default:
|
---|
| 62 | // TODO
|
---|
| 63 | break;
|
---|
| 64 | }
|
---|
| 65 | }
|
---|
| 66 | }
|
---|
| 67 | ?>
|
---|
Note:
See
TracBrowser
for help on using the repository browser.