OSDN Git Service

verbose mode test.
authorgn64_jp <gn64_jp@4e526526-5e11-4fc0-8910-f8fd03428081>
Thu, 7 Oct 2010 14:19:05 +0000 (14:19 +0000)
committergn64_jp <gn64_jp@4e526526-5e11-4fc0-8910-f8fd03428081>
Thu, 7 Oct 2010 14:19:05 +0000 (14:19 +0000)
git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/rec10@673 4e526526-5e11-4fc0-8910-f8fd03428081

rec10/trunk/src/classify.py
rec10/trunk/src/epgdb.py
rec10/trunk/src/guess.py
rec10/trunk/src/install.py
rec10/trunk/src/rec10.conf
rec10/trunk/src/rec10d.py
rec10/trunk/src/timerec.py
rec10/trunk/src/ts2epg.py
rec10/trunk/src/ts2x264.py
rec10/trunk/src/tv2ts.py
rec10/trunk/src/xml2db_dom.py

index bcf1297..6dfab35 100644 (file)
@@ -34,34 +34,34 @@ if __name__ == "__main__":
         ltitle=unicode(opts.ltitle,'utf-8')
         sf=guess.searchFolder(ltitle, recordedpath)
         print "###MKV###"
-        recdblist.printutf8(os.path.join(sf, auto_move.get_move_dest_path(ltitle,recpath,sf,".mkv")+".mkv"))
+        recdblist.printutf8(os.path.join(sf, auto_move.get_move_dest_path(ltitle,recpath,sf,".mkv")+".mkv"),verbose_level=100)
         print "\n"
         print "###MP4###"
-        recdblist.printutf8(os.path.join(sf, auto_move.get_move_dest_path(ltitle,recpath,sf,".mp4")+".mp4"))
+        recdblist.printutf8(os.path.join(sf, auto_move.get_move_dest_path(ltitle,recpath,sf,".mp4")+".mp4"),verbose_level=100)
         print "\n"
     elif opts.auto:##-A の場合
         sa=auto_move.search_file(recpath, recordedpath, ".mkv")
         for t in sa:
-            recdblist.printutf8(u"自動推測実行中-MKV")
+            recdblist.printutf8(u"自動推測実行中-MKV",verbose_level=100)
             sf=guess.searchFolder(t,recordedpath)
             if sf!="":
-                recdblist.printutf8(u"移動先")
-                recdblist.printutf8(t+" : "+os.path.join(sf, auto_move.get_move_dest_path(t, recpath,sf,".mkv")+".mkv"))
-                recdblist.printutf8(u"実行中")
+                recdblist.printutf8(u"移動先",verbose_level=100)
+                recdblist.printutf8(t+" : "+os.path.join(sf, auto_move.get_move_dest_path(t, recpath,sf,".mkv")+".mkv"),verbose_level=100)
+                recdblist.printutf8(u"実行中",verbose_level=100)
                 auto_move.execMove(t, recpath, recordedpath,".mkv",1)
             else:
-                recdblist.printutf8(t+" can't find matching folder")
+                recdblist.printutf8(t+" can't find matching folder",verbose_level=100)
         sa=auto_move.search_file(recpath, recordedpath, ".mp4")
         for t in sa:
-            recdblist.printutf8(u"自動推測実行中-MP4")
+            recdblist.printutf8(u"自動推測実行中-MP4",verbose_level=100)
             sf=guess.searchFolder(t,recordedpath)
             if sf!="":
-                recdblist.printutf8(u"移動先")
-                recdblist.printutf8(t+" : "+os.path.join(sf, auto_move.get_move_dest_path(t, recpath,sf,".mp4")+".mp4"))
-                recdblist.printutf8(u"実行中")
+                recdblist.printutf8(u"移動先",verbose_level=100)
+                recdblist.printutf8(t+" : "+os.path.join(sf, auto_move.get_move_dest_path(t, recpath,sf,".mp4")+".mp4"),verbose_level=100)
+                recdblist.printutf8(u"実行中",verbose_level=100)
                 auto_move.execMove(t, recpath, recordedpath,".mp4",1)
             else:
-                recdblist.printutf8(t+" can't find matching folder")
+                recdblist.printutf8(t+" can't find matching folder",verbose_level=100)
     elif opts.delete:##-Dの場合
         sa=auto_move.search_file(recpath, recordedpath,".mkv")
         for t in sa:
@@ -74,12 +74,12 @@ if __name__ == "__main__":
         for t in sa:
             sf=guess.searchFolder(t,recordedpath)
             if sf!="":
-                recdblist.printutf8(t+u" : "+os.path.join(sf, auto_move.get_move_dest_path(t, recpath,sf,".mkv")+".mkv"))
+                recdblist.printutf8(t+u" : "+os.path.join(sf, auto_move.get_move_dest_path(t, recpath,sf,".mkv")+".mkv"),verbose_level=100)
         sa=auto_move.search_file(recpath, recordedpath,".mp4")
         for t in sa:
             sf=guess.searchFolder(t,recordedpath)
             if sf!="":
-                recdblist.printutf8(t+u" : "+os.path.join(sf, auto_move.get_move_dest_path(t, recpath,sf,".mp4")+".mp4"))
+                recdblist.printutf8(t+u" : "+os.path.join(sf, auto_move.get_move_dest_path(t, recpath,sf,".mp4")+".mp4"),verbose_level=100)
     elif opts.etitle!="":
         if os.path.exists(os.path.join(recpath, etitle+".mkv")):
             auto_move.execMove(etitle,recpath, recordedpath,".mkv",1)
@@ -100,7 +100,7 @@ if __name__ == "__main__":
                     print "\n"
             sa=auto_move.search_file(recpath, tsmovepath,".ts")
         else:
-            recdblist.printutf8(u"ts_movepathが設定されていません。/etc/rec10.confを設定してください。")
+            recdblist.printutf8(u"ts_movepathが設定されていません。/etc/rec10.confを設定してください。",verbose_level=100)
     elif opts.tsmove:##-Tの場合
         tsmovepath=""
         try:
@@ -112,13 +112,13 @@ if __name__ == "__main__":
             for t in sa:
                 sf=guess.searchFolder(t,tsmovepath,700)
                 if sf!="":
-                    recdblist.printutf8(u"移動先")
-                    recdblist.printutf8(t+" : "+os.path.join(sf, auto_move.get_move_dest_path(t, recpath,sf,".ts")+".ts"))
-                    recdblist.printutf8(u"実行中")
+                    recdblist.printutf8(u"移動先",verbose_level=100)
+                    recdblist.printutf8(t+" : "+os.path.join(sf, auto_move.get_move_dest_path(t, recpath,sf,".ts")+".ts"),verbose_level=100)
+                    recdblist.printutf8(u"実行中",verbose_level=100)
                     auto_move.execMove(t, recpath, tsmovepath,".ts",0)
             sa=auto_move.search_file(recpath, tsmovepath,".ts")
         else:
-            recdblist.printutf8(u"ts_movepathが設定されていません。/etc/rec10.confを設定してください。")
+            recdblist.printutf8(u"ts_movepathが設定されていません。/etc/rec10.confを設定してください。",verbose_level=100)
     elif opts.seriespath!="":##-Sの場合##与えられたパスにシリーズがそろっているかを調べる。
         ss=guess.detSeriesNum(opts.seriespath)
         for sstitle, ssv in ss.iteritems():
index 7fb0968..bbd7fd0 100644 (file)
@@ -41,7 +41,7 @@ def updatebc(bctype):
         time.sleep(5)
         rec10d.rec10db.update_by_bctype_epg_ch(bctype)
     except Exception, inst:
-        recdblist.Commonlogex("Error","updatebc(epgdb.py)", str(type(inst)), str(inst))
+        recdblist.Commonlogex("Error","updatebc(epgdb.py)", str(type(inst)), str(inst),log_level=200)
         xml2db_dom.xml2db_dom(tmppath + bctype + "epgdata.bak.xml", bctype)
         rec10d.rec10db.update_status_by_bctype_epg_ch(bctype, "2")
 def updatebc_bak(bctype):
index ad554a8..771df9d 100644 (file)
@@ -36,7 +36,7 @@ def detDeltaNum(title,movepath):
     ff=[]
     maxnum=0
     for file in files:
-        recdblist.printutf8(unicode(file,'utf-8'))
+        recdblist.printutf8(unicode(file,'utf-8'),verbose_level=800)
         file=os.path.join(movepath,file)
         if os.path.isfile(file):
             name=os.path.splitext(os.path.split(file)[1])
@@ -128,7 +128,7 @@ def detNameType(title,path):
         title=title.replace(u"[新]","")
         title=title.replace(u" 新","")
         new=1
-    recdblist.printutf8(title)
+    recdblist.printutf8(title,verbose_level=800)
     title=auto_move.getTitle(title)##titleから日時を除く
     title=title.replace(u"無料≫","")
     #rA=re.compile(".+(?P<title>)#\d(?P<num>)\s[0,10]\z")
index fc15420..7646fdb 100644 (file)
@@ -15,9 +15,9 @@ def printutf8(str):
     print str.encode('utf-8')
 def install():
     version = recdblist.version
-    recdblist.printutf8(u"rec10の環境インストールを開始します。")
+    recdblist.printutf8(u"rec10の環境インストールを開始します。",verbose_level=100)
     time.sleep(1)
-    recdblist.printutf8(u"環境インストール処理中・・・")
+    recdblist.printutf8(u"環境インストール処理中・・・",verbose_level=100)
     path = str(os.path.dirname(os.path.abspath(__file__)))
     confp = ConfigParser.SafeConfigParser()
     Conf = 'rec10.conf'
@@ -31,34 +31,34 @@ def install():
     if confpath!="":
         confp.read(confpath)
     else:
-        recdblist.printutf8(u"rec10.confが見つかりません。")
-        recdblist.printutf8(u"このinstall.pyと同じフォルダに置くか、/etc/rec10.confもしくは/etc/rec10/rec10.confにおいてください。")
+        recdblist.printutf8(u"rec10.confが見つかりません。",verbose_level=100)
+        recdblist.printutf8(u"このinstall.pyと同じフォルダに置くか、/etc/rec10.confもしくは/etc/rec10/rec10.confにおいてください。",verbose_level=100)
         sys.exit(1)
-    recdblist.printutf8(u"設定ファイルの読み込みを確認//設定ファイルのパスは"+confpath)
+    recdblist.printutf8(u"設定ファイルの読み込みを確認//設定ファイルのパスは"+confpath,verbose_level=100)
     if confp.get('path',"recpath")=="/path of /recording":
-        recdblist.printutf8(u"録画先のフォルダを設定してください(recpath=)")
+        recdblist.printutf8(u"録画先のフォルダを設定してください(recpath=)",verbose_level=100)
         sys.exit(1)
-    recdblist.printutf8(u"DB処理に入ります")
+    recdblist.printutf8(u"DB処理に入ります",verbose_level=100)
     if os.path.exists(os.path.join(path,"rec10d.py")):
         try:
             update_db_all()
         except Exception, inst:
-            recdblist.printutf8(u"DB処理中にエラーが出ました。configファイルのDB設定を見直してください。")
-            recdblist.printutf8(str(type(inst)))
-            recdblist.printutf8(str(inst))
-    recdblist.printutf8(u"チャンネル設定に入ります")
+            recdblist.printutf8(u"DB処理中にエラーが出ました。configファイルのDB設定を見直してください。",verbose_level=100)
+            recdblist.printutf8(str(type(inst)),verbose_level=100)
+            recdblist.printutf8(str(inst),verbose_level=100)
+    recdblist.printutf8(u"チャンネル設定に入ります",verbose_level=100)
     if os.path.exists(os.path.join(path,"chlist.xml")):
-        recdblist.printutf8(u"チャンネルリストが見つかりました。||chlist.xml")
+        recdblist.printutf8(u"チャンネルリストが見つかりました。||chlist.xml",verbose_level=100)
     else:
-        recdblist.printutf8(u"チャンネルリストが見つかりません。"+os.path.join(path,"chlist.xml")+u"を作成してください。")
-        recdblist.printutf8(u"東京/名古屋/神戸のサンプルがchlist_sample_*.xmlにあるため、参考にしてください。")
+        recdblist.printutf8(u"チャンネルリストが見つかりません。"+os.path.join(path,"chlist.xml")+u"を作成してください。",verbose_level=100)
+        recdblist.printutf8(u"東京/名古屋/神戸のサンプルがchlist_sample_*.xmlにあるため、参考にしてください。",verbose_level=100)
         sys.exit(1)
     bsok=int(confp.get('env',"bs"))
     csok=int(confp.get('env',"cs"))
     import chdata
     chdata.new_chdata(bsok,csok)
-    recdblist.printutf8(u"おめでとうございます 初期設定は完了しました。")
-    recdblist.printutf8(u"rec10を実行するユーザーのcrontabに"+os.path.join(path,"rec10")+u"を追加してください(5分周期が目安)")
+    recdblist.printutf8(u"おめでとうございます 初期設定は完了しました。",verbose_level=100)
+    recdblist.printutf8(u"rec10を実行するユーザーのcrontabに"+os.path.join(path,"rec10")+u"を追加してください(5分周期が目安)",verbose_level=100)
     import rec10d
     rec10d.rec10db.change_installed_in_status()
 def getpath(cmd):
@@ -269,11 +269,11 @@ def update_db_all():
     if rec10d.rec10db.select_installed_in_status()==1:
         if rec10d.rec10db.select_version_in_status()==0:
             tversion=0
-            recdblist.printutf8(u"既存のDBが見つかりました。0.9.1と仮定してアップデート処理を行います。")
+            recdblist.printutf8(u"既存のDBが見つかりました。0.9.1と仮定してアップデート処理を行います。",verbose_level=100)
             update_db(0)
             time.sleep(1)
         else:
-            recdblist.printutf8(u"既存のDBが見つかりました。アップデート処理を行います。")
+            recdblist.printutf8(u"既存のDBが見つかりました。アップデート処理を行います。",verbose_level=100)
         tversion=int(rec10d.rec10db.select_version_in_status())
         while (recdblist.version>tversion):
             update_db(tversion)
index 4fefb30..70cb667 100644 (file)
@@ -64,5 +64,5 @@ x264_addline =
 remove_ts = 0
 
 [log]
-verbose = 400#デーモンとして使う場合は変更する必要はありません。
+verbose_level = 400#デーモンとして使う場合は変更する必要はありません。
 log_level = 400#
\ No newline at end of file
index 2e33b23..9ea324f 100644 (file)
@@ -9,6 +9,7 @@ warnings.filterwarnings('ignore', "the sets module is deprecated")
 import configreader
 import dbMySQL
 import timerec
+import recdblist
 path = str(os.path.dirname(os.path.abspath(__file__))) + "/"
 global rec10db
 def main():
@@ -24,6 +25,8 @@ if db == "MySQL":
     rec10db.new_in_status()
 else:
     rec10db = dbSQLite.DB_SQLite(path + "ch.db")
+recdblist.log_level_now=configreader.getlog("log_level")
+recdblist.verbose_level_now=configreader.getlog("verbose_level")
 if __name__ == "__main__":
     main()
 
index fd45231..46b6a89 100644 (file)
@@ -23,6 +23,7 @@ import tv2avi
 import tv2mkv
 import tv2mp4
 import install
+from recdblist import verbose_level_now
 import recdblist
 recpath = configreader.getpath('recpath')
 movepath = configreader.getpath('move_destpath')
@@ -42,8 +43,8 @@ def task():
     recdb.delete_old_auto_keyword("1")
     tasks = recdb.getnow("3")
     inum = recdb.countRecNow_minutes("10")
-    recdblist.printutf8(u"rec10処理開始"+ datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S"))
-    recdblist.printutf8(u"直近録画予約件数:" + str(inum) + u"BS/CS録画中件数:" + str(status.getBSCSRecording()) + u"TE録画中件数:" + str(status.getTERecording()) )
+    recdblist.printutf8(u"rec10処理開始"+ datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S"),verbose_level=800)
+    recdblist.printutf8(u"直近録画予約件数:" + str(inum) + u"BS/CS録画中件数:" + str(status.getBSCSRecording()) + u"TE録画中件数:" + str(status.getTERecording()) ,verbose_level=800)
     encodenum=0
     b25num=0
     dnow=datetime.datetime.now()
@@ -76,15 +77,15 @@ def task():
                 recnum = 0
                 if bctype.find('te') > -1:
                     recnum = status.getTERecording() + recdb.countRecNow_minutes_TE("10")
-                    recdblist.printutf8(u"放送種別:"+bctype + u"||該当チューナー実行中件数:" + str(status.getTERecording()) + u":直近予約件数:" + str(recdb.countRecNow_minutes_TE("10")))
+                    recdblist.printutf8(u"放送種別:"+bctype + u"||該当チューナー実行中件数:" + str(status.getTERecording()) + u":直近予約件数:" + str(recdb.countRecNow_minutes_TE("10")),verbose_level=800)
                     recnum = int(configreader.getenv("te_max")) -recnum
                 else:
                     recnum = status.getBSCSRecording() + recdb.countRecNow_minutes_BSCS("10")
-                    recdblist.printutf8(u"放送種別:"+bctype + u"||該当チューナー実行中件数:" + str(status.getBSCSRecording()) + u":直近予約件数:" + str(recdb.countRecNow_minutes_BSCS("10")))
+                    recdblist.printutf8(u"放送種別:"+bctype + u"||該当チューナー実行中件数:" + str(status.getBSCSRecording()) + u":直近予約件数:" + str(recdb.countRecNow_minutes_BSCS("10")),verbose_level=800)
                     recnum = int(configreader.getenv("bscs_max")) -recnum
                 if recnum >0 :
                     recdblist.printutf8(str(update))
-                    rec10d.rec10db.update_status_by_bctype_epg_ch(bctype, "0")
+                    rec10d.rec10db.update_status_by_bctype_epg_ch(bctype, "0",verbose_level=750)
                     epgdb.updatebc(bctype)
                     update = chdb.update()
                     i = i + 1
@@ -272,12 +273,12 @@ def search_keyword(key):
                             topt=status.getSettings_auto_opt()
                             recdb.recreserv(titlet,chtxtt, btimet, etimet,topt)
                     except Exception, inst:
-                        recdblist.Commonlogex("Error", "search_keyword_auto_jbk(timerec.py)", str(type(inst)),str(inst))
+                        recdblist.Commonlogex("Error", "search_keyword_auto_jbk(timerec.py)", str(type(inst)),str(inst),log_level=200)
                 else:
                     try:
                         recdb.add_auto_keyword(chtxtt, titlet, btimet, etimet)
                     except Exception, inst:
-                        recdblist.Commonlogex("Error", "search_keyword(timerec.py)", str(type(inst)),str(inst))
+                        recdblist.Commonlogex("Error", "search_keyword(timerec.py)", str(type(inst)),str(inst),log_level=200)
 def type_reserve(typetxt,chtxt,title,bt,et,opt):
     btime = bt.strftime("%Y-%m-%d %H:%M:%S")
     etime = et.strftime("%Y-%m-%d %H:%M:%S")
@@ -315,7 +316,7 @@ def type_reserve(typetxt,chtxt,title,bt,et,opt):
                     auto_rec.add_key("ALL", titlen,exp+" "+longexp)
                     recdblist.printutf8(u"追いかけ機能実行中: "+title+" : "+titlen+" "+btimen+" "+etimen)
                 except Exception, inst:
-                    recdblist.Commonlogex("Error", "Oikake DB(timerec.py)", str(type(inst)),str(inst))
+                    recdblist.Commonlogex("Error", "Oikake DB(timerec.py)", str(type(inst)),str(inst),log_level=200)
             else:
                 recdblist.printutf8(u"追いかけ機能エラー:番組データが見付かりません。")
         else:
@@ -343,15 +344,15 @@ def type_reserve(typetxt,chtxt,title,bt,et,opt):
                 auto_rec.add_key(chtxt, titlen,exp+" "+longexp)
                 auto_rec.add_key("ALL", titlen,exp+" "+longexp)
                 #recdblist.printutf8(u"追いかけ機能実行中: "+title+" : "+titlen+" "+btimen+" "+etimen)
-                recdblist.Commonlogex(u"通常", "Oikake (timerec.py)",u"追いかけ機能実行中",u"追いかけ機能実行中: "+title+" : "+titlen+" "+btimen+" "+etimen)
+                recdblist.Commonlogex(u"通常", "Oikake (timerec.py)",u"追いかけ機能実行中",u"追いかけ機能実行中: "+title+" : "+titlen+" "+btimen+" "+etimen,log_level=500)
             except Exception, inst:
-                recdblist.Commonlogex("Error", "Oikake DB(timerec.py)", str(type(inst)),str(inst))
+                recdblist.Commonlogex("Error", "Oikake DB(timerec.py)", str(type(inst)),str(inst),log_level=200)
     elif dt <= 20 * 60:
         try:
             recdb.del_reckey(typetxtnow, title, chtxt, btime)
             recdb.rec_reckey(typetxtfinal, title, chtxt, btime, etime, opt)
         except Exception, inst:
-            recdblist.Commonlogex("Error", "Oikake DB(timerec.py)", str(type(inst)),str(inst))
+            recdblist.Commonlogex("Error", "Oikake DB(timerec.py)", str(type(inst)),str(inst),log_level=200)
 def type_final(typetxt,chtxt,title,bt,et,opt):
     btime = bt.strftime("%Y-%m-%d %H:%M:%S")
     etime = et.strftime("%Y-%m-%d %H:%M:%S")
@@ -385,7 +386,7 @@ def type_final(typetxt,chtxt,title,bt,et,opt):
             newtime=bt
             newtitle=newtitle+u"_"+iff+newtime.strftime("%Y-%m-%dT%H-%M-%S")
         recdb.rec_reckey(typetxting, newtitle, chtxt, btime, etime, opt)
-        recdblist.Commonlogex(u"通常","timerec.py",u"録画開始 "+newtitle+" "+btime+" "+etime,"")
+        recdblist.Commonlogex(u"通常","timerec.py",u"録画開始 "+newtitle+" "+btime+" "+etime,"",log_level=500)
         tv2avi.timetv2b25(recpath + "/" + newtitle + ".avi", chtxt, btime, etime, opt)
         recdb.del_reckey(typetxting, newtitle, chtxt, btime)
         if not re.search("R", opt):
@@ -436,7 +437,7 @@ def type_keyword(typetxt,chtxt,title,bt,et,opt,deltatime):
             recdb.rec_reclog(titlet, chtxtt, btimet, etimet, opt, exp,longexp,category)
             auto_rec.add_key(chtxt, titlet,exp+" "+longexp)
             auto_rec.add_key("ALL", titlet,exp+" "+longexp)
-            recdblist.Commonlogex(u"通常","timerec.py",u"key "+title+u" : "+titlet+u" "+btimet+u" "+etimet,"")
+            recdblist.Commonlogex(u"通常","timerec.py",u"key "+title+u" : "+titlet+u" "+btimet+u" "+etimet,"",log_level=500)
             #except Exception, inst:
             #    recdblist.printutf8("Error happened in REC_KEYWORD DB")
             #    recdblist.printutf8(type(inst))
@@ -533,7 +534,7 @@ def type_decode_que(typetxt,chtxt,title,bt,et,opt):
                     errtxt1="move ts error.\n"
                     errtxt2=str(type(inst))+"\n"
                     errtxt2=errtxt2+str(inst)
-                    recdblist.Commonlogex("Error", "type_decode_que(timerec.py)", errtxt1,errtxt2)
+                    recdblist.Commonlogex("Error", "type_decode_que(timerec.py)", errtxt1,errtxt2,log_level=200)
                 recdb.rec_reckey(recdblist.REC_MOVE_END, title, chtxt, btime, etime, opt)
         else:
             recdb.del_reckey(typetxtnow, title, chtxt, btime)
@@ -654,7 +655,7 @@ def type_encode_que(typetxt,chtxt,title,bt,et,opt):
                     errtxt1="move mkv/mp4 error."
                     errtxt2=str(type(inst))+"\n"
                     errtxt2=errtxt2+str(inst)
-                    recdblist.Commonlogex("Error", "type_encode_que(timerec.py)", errtxt1,errtxt2)
+                    recdblist.Commonlogex("Error", "type_encode_que(timerec.py)", errtxt1,errtxt2,log_level=200)
                 recdb.rec_reckey(recdblist.REC_MOVE_END, title, chtxt, btime, etime, opt)
             recdb.rec_reckey(typetxtfin, title, chtxt, btime, etime, opt)
             sys.exit()
index f6a3ea3..bd57c34 100644 (file)
@@ -26,7 +26,7 @@ def write_time(pout, ch ,times):
     """
     指定された時間分tsを取得してepgの入ったxmlとして書き出す
     """
-    recdblist.Commonlogex(u"通常","write_time(ts2epg.py)",u"Ts-EPG XML書き出し処理開始" ,u"CH:"+ch)
+    recdblist.Commonlogex(u"通常","write_time(ts2epg.py)",u"Ts-EPG XML書き出し処理開始" ,u"CH:"+ch,log_level=500)
     timet = times
     if re.search(u'CS', ch):
         mode = "/CS"
@@ -43,7 +43,7 @@ def write_time(pout, ch ,times):
     tv2ts.tv2tsmix(pout + ".ts", ch, timet)
     exe = "export LANG=ja_JP.UTF-8 && nice -n 15 " + epgdump + " " + mode + " " + pout + ".ts " + pout
     recdblist.printutf8(exe)
-    recdblist.Commonlogex(u"通常", "write_time(ts2epg.py)", exe,"")
+    recdblist.Commonlogex(u"通常", "write_time(ts2epg.py)", exe,"",log_level=500)
     os.system(exe)
     time.sleep(10)
 
index fb2e03b..345dbf7 100644 (file)
@@ -70,12 +70,12 @@ def ts2x264(pin, pout, opts):#sizeは"HD"か"SD"
             tm2v=pin.replace(".ts",".m2v")
             encode_sar(tm2v, pout,size,is24fps,quality,crf,deinterlace)
         except Exception, inst:
-            recdblist.Commonlogex("Error", "ts2x264(ts2x264.py)", str(type(inst)), str(inst))
+            recdblist.Commonlogex("Error", "ts2x264(ts2x264.py)", str(type(inst)), str(inst),log_level=200)
     else:
         try:
             encode_sar(pin, pout,size,is24fps,quality,crf,deinterlace)
         except Exception, inst:
-            recdblist.Commonlogex("Error", "ts2x264(ts2x264.py)", str(type(inst)), str(inst))
+            recdblist.Commonlogex("Error", "ts2x264(ts2x264.py)", str(type(inst)), str(inst),log_level=200)
 def encode_sar(pin,pout,size,is24fps,quality,crf,deinterlace=1):
     mencoder=configreader.getpath("mencoder")
     encvf=""
index 3f7d74b..12c89b0 100644 (file)
@@ -29,7 +29,7 @@ def tv2ts(pout, ch, csch, time):
     try:
         tv2b25ts(pout + ".b25", ch, time)
     except Exception, inst:
-        recdblist.Commonlogex(u"Error",u"tv2ts(tv2ts.py)", str(type(inst)),str(inst))
+        recdblist.Commonlogex(u"Error",u"tv2ts(tv2ts.py)", str(type(inst)),str(inst),log_level=200)
     if len(ch) > 2:#BS/CSは100とかCS??とかなので3文字以上
         status.changeBSCSRecording(-1)
     else:
index 2a2f3e7..a976152 100644 (file)
@@ -129,6 +129,6 @@ def addTitle_Subtitle(recompiled,num,title,exp):
         else:
             newtitle=title
     except Exception, inst:
-        recdblist.Commonlogex("Error", "addTitle_Subtitle(xml2db_dob.py)", str(type(inst)),str(inst))
+        recdblist.Commonlogex("Error", "addTitle_Subtitle(xml2db_dob.py)", str(type(inst)),str(inst),log_level=200)
         newtitle=title
     return newtitle
\ No newline at end of file