# HG changeset patch # User Yoshiki Yazawa # Date 1269699685 -32400 # Node ID 3a6ec345ab0cb686761ad07e8e03003b37272853 # Parent 8f4f74463d08146ca23913e44d04cf4687414309# Parent 5b192e94f49d4f835dff8be7de0b97a71d15f95a merged with upstream diff -r 8f4f74463d08 -r 3a6ec345ab0c Reservation.class.php --- a/Reservation.class.php Fri Mar 26 15:41:36 2010 +0900 +++ b/Reservation.class.php Sat Mar 27 23:21:25 2010 +0900 @@ -303,7 +303,7 @@ } else { $rrec->delete(); - reclog( "Reservation::custom atの実行に失敗した模様", E_ERROR); + reclog( "Reservation::custom atの実行に失敗した模様", EPGREC_ERROR); throw new Exception("AT実行エラー"); } // job番号を取り出す @@ -323,7 +323,7 @@ } // エラー $rrec->delete(); - reclog( "Reservation::custom job番号の取得に失敗",E_ERROR ); + reclog( "Reservation::custom job番号の取得に失敗",EPGREC_ERROR ); throw new Exception( "job番号の取得に失敗" ); } catch( Exception $e ) { @@ -356,7 +356,8 @@ if( ! $rec->complete ) { // 未実行の予約である if( toTimestamp($rec->starttime) < (time() + PADDING_TIME + $settings->former_time) ) { - reclog("Reservation::cancel 未実行の予約の取り消しが実行された", E_ERROR ); + reclog("Reservation::cancel 未実行の予約の取り消しが実行された", EPGREC_ERROR ); + throw new Exception("未実行の予約です"); } exec( $settings->atrm . " " . $rec->job ); reclog("Reservation::cancel ジョブ番号".$rec->job."を削除"); @@ -364,7 +365,7 @@ $rec->delete(); } catch( Exception $e ) { - reclog("Reservation::cancel 予約キャンセルでDB接続またはアクセスに失敗した模様", E_ERROR ); + reclog("Reservation::cancel 予約キャンセルでDB接続またはアクセスに失敗した模様", EPGREC_ERROR ); throw $e; } } diff -r 8f4f74463d08 -r 3a6ec345ab0c recLog.inc.php --- a/recLog.inc.php Fri Mar 26 15:41:36 2010 +0900 +++ b/recLog.inc.php Sat Mar 27 23:21:25 2010 +0900 @@ -1,10 +1,11 @@ id .":".$rrec->type.$rrec->channel.$rrec->title."の録画に失敗した模様", E_ERROR ); + reclog( "recomplete:: 予約ID". $rrec->id .":".$rrec->type.$rrec->channel.$rrec->title."の録画に失敗した模様", EPGREC_ERROR ); $rrec->delete(); } } catch( exception $e ) { - reclog( "recomplete:: 予約テーブルのアクセスに失敗した模様", E_ERROR ); - reclog( "recomplete:: ".$e->getMessage()."" , E_ERROR ); + reclog( "recomplete:: 予約テーブルのアクセスに失敗した模様", EPGREC_ERROR ); + reclog( "recomplete:: ".$e->getMessage()."" , EPGREC_ERROR ); exit( $e->getMessage() ); } diff -r 8f4f74463d08 -r 3a6ec345ab0c storeProgram.inc.php --- a/storeProgram.inc.php Fri Mar 26 15:41:36 2010 +0900 +++ b/storeProgram.inc.php Sat Mar 27 23:21:25 2010 +0900 @@ -45,7 +45,7 @@ // XML parse $xml = @simplexml_load_file( $xmlfile ); if( $xml === false ) { - reclog( "getepg:: 正常な".$xmlfile."が作成されなかった模様(放送間帯でないなら問題ありません)" ); + reclog( "getepg:: 正常な".$xmlfile."が作成されなかった模様(放送間帯でないなら問題ありません)", EPGREC_WARN ); return; // XMLが読み取れないなら何もしない } // channel抽出 @@ -71,7 +71,7 @@ } } catch( Exception $e ) { - reclog( "getepg::DBの接続またはチャンネルテーブルの書き込みに失敗", E_ERROR ); + reclog( "getepg::DBの接続またはチャンネルテーブルの書き込みに失敗", EPGREC_ERROR ); } } // channel 終了 @@ -89,7 +89,7 @@ $channel_rec = new DBRecord(CHANNEL_TBL, "channel_disc", "$channel_disc" ); } catch( Exception $e ) { - reclog( "getepg::チャンネルレコード $channel_disc が発見できない", E_ERROR ); + reclog( "getepg::チャンネルレコード $channel_disc が発見できない", EPGREC_ERROR ); } if( $channel_rec == null ) continue; // あり得ないことが起きた if( $channel_rec->skip == 1 ) continue; // 受信しないチャンネル @@ -126,8 +126,8 @@ $cat_rec = new DBRecord(CATEGORY_TBL, "category_disc" , $category_disc ); } catch( Exception $e ) { - reclog("getepg:: カテゴリテーブルのアクセスに失敗した模様", E_ERROR ); - reclog("getepg:: ".$e->getMessage()."" ,E_ERROR ); + reclog("getepg:: カテゴリテーブルのアクセスに失敗した模様", EPGREC_ERROR ); + reclog("getepg:: ".$e->getMessage()."" ,EPGREC_ERROR ); exit( $e->getMessage() ); } @@ -196,8 +196,8 @@ } } catch(Exception $e) { - reclog( "getepg:: プログラムテーブルに問題が生じた模様", E_ERROR ); - reclog( "getepg:: ".$e->getMessage()."" , E_ERROR); + reclog( "getepg:: プログラムテーブルに問題が生じた模様", EPGREC_ERROR ); + reclog( "getepg:: ".$e->getMessage()."" , EPGREC_ERROR); exit( $e->getMessage() ); } } diff -r 8f4f74463d08 -r 3a6ec345ab0c templates/logTable.html --- a/templates/logTable.html Fri Mar 26 15:41:36 2010 +0900 +++ b/templates/logTable.html Sat Mar 27 23:21:25 2010 +0900 @@ -37,8 +37,8 @@ } table#log_table td.errorlevel0 {background-color: #FFFFFF;} -table#log_table td.errorlevel1 {background-color: red;} - +table#log_table td.errorlevel1 {background-color: yellow;} +table#log_table td.errorlevel2 {background-color: red;} --> @@ -63,7 +63,8 @@ {if $log->level == 0}情報 - {elseif $log->level == 1}エラー + {elseif $log->level == 1}警告 + {elseif $log->level == 2}エラー {/if} {$log->logtime}