Mercurial > epgrec.yaz
annotate recLog.inc.php @ 143:42f6eb738567
mod: 積み残しを修正
author | epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp> |
---|---|
date | Sun, 21 Mar 2010 21:54:03 +0900 |
parents | 9c5e597ef6c6 |
children | 5b192e94f49d |
rev | line source |
---|---|
135
9c5e597ef6c6
mod: ログ機能を追加
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
1 <?php |
9c5e597ef6c6
mod: ログ機能を追加
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
2 |
9c5e597ef6c6
mod: ログ機能を追加
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
3 define( "E_INFO" , 0 ); |
9c5e597ef6c6
mod: ログ機能を追加
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
4 define( "E_ERROR", 2 ); |
9c5e597ef6c6
mod: ログ機能を追加
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
5 |
9c5e597ef6c6
mod: ログ機能を追加
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
6 |
9c5e597ef6c6
mod: ログ機能を追加
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
7 function reclog( $message , $level = E_INFO ) { |
9c5e597ef6c6
mod: ログ機能を追加
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
8 |
9c5e597ef6c6
mod: ログ機能を追加
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
9 try { |
9c5e597ef6c6
mod: ログ機能を追加
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
10 $log = new DBRecord( LOG_TBL ); |
9c5e597ef6c6
mod: ログ機能を追加
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
11 |
9c5e597ef6c6
mod: ログ機能を追加
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
12 $log->logtime = date("Y-m-d H:i:s"); |
9c5e597ef6c6
mod: ログ機能を追加
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
13 $log->level = $level; |
9c5e597ef6c6
mod: ログ機能を追加
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
14 $log->message = $message; |
9c5e597ef6c6
mod: ログ機能を追加
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
15 } |
9c5e597ef6c6
mod: ログ機能を追加
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
16 catch( Exception $e ) { |
9c5e597ef6c6
mod: ログ機能を追加
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
17 // |
9c5e597ef6c6
mod: ログ機能を追加
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
18 } |
9c5e597ef6c6
mod: ログ機能を追加
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
19 } |
9c5e597ef6c6
mod: ログ機能を追加
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
20 |
9c5e597ef6c6
mod: ログ機能を追加
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff
changeset
|
21 ?> |