annotate recLog.inc.php @ 149:5b192e94f49d

fix: 予約済み定数を使ってしまったミスを修正。エラーレベルに警告を追加
author epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
date Sat, 27 Mar 2010 16:04:54 +0900
parents 9c5e597ef6c6
children 64b60603d7df
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
149
5b192e94f49d fix: 予約済み定数を使ってしまったミスを修正。エラーレベルに警告を追加
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents: 135
diff changeset
3 define( "EPGREC_INFO" , 0 );
5b192e94f49d fix: 予約済み定数を使ってしまったミスを修正。エラーレベルに警告を追加
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents: 135
diff changeset
4 define( "EPGREC_WARN" , 1 );
5b192e94f49d fix: 予約済み定数を使ってしまったミスを修正。エラーレベルに警告を追加
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents: 135
diff changeset
5 define( "EPGREC_ERROR", 2 );
135
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
149
5b192e94f49d fix: 予約済み定数を使ってしまったミスを修正。エラーレベルに警告を追加
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents: 135
diff changeset
8 function reclog( $message , $level = EPGREC_INFO ) {
135
9c5e597ef6c6 mod: ログ機能を追加
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
9
9c5e597ef6c6 mod: ログ機能を追加
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
10 try {
9c5e597ef6c6 mod: ログ機能を追加
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
11 $log = new DBRecord( LOG_TBL );
9c5e597ef6c6 mod: ログ機能を追加
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
12
9c5e597ef6c6 mod: ログ機能を追加
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
13 $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
14 $log->level = $level;
9c5e597ef6c6 mod: ログ機能を追加
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
15 $log->message = $message;
9c5e597ef6c6 mod: ログ機能を追加
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
16 }
9c5e597ef6c6 mod: ログ機能を追加
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
17 catch( Exception $e ) {
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
9c5e597ef6c6 mod: ログ機能を追加
epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp>
parents:
diff changeset
22 ?>