comparison recLog.inc.php @ 154:64b60603d7df

mod: RecExceptionÄɲÃ
author epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
date Sun, 28 Mar 2010 22:58:24 +0900
parents 5b192e94f49d
children
comparison
equal deleted inserted replaced
153:4099ae0393eb 154:64b60603d7df
1 <?php 1 <?php
2 2
3 define( "EPGREC_INFO" , 0 ); 3 define( "EPGREC_INFO" , 0 );
4 define( "EPGREC_WARN" , 1 ); 4 define( "EPGREC_WARN" , 1 );
5 define( "EPGREC_ERROR", 2 ); 5 define( "EPGREC_ERROR", 2 );
6
7 class RecException extends Exception {
8
9 private $level = EPGREC_INFO;
10
11 public function __construct( $mesg, $l = EPGREC_INFO ) {
12 parent::__construct( $mesg );
13 $this->level = $l;
14 }
15
16 public function getLevel() {
17 return $this->level;
18 }
19 }
6 20
7 21
8 function reclog( $message , $level = EPGREC_INFO ) { 22 function reclog( $message , $level = EPGREC_INFO ) {
9 23
10 try { 24 try {