REC_BAYES_SUGGEST ="bayes_suggest"
version = 96
+version_str="0.9.6"
def printutf8(unicode):
str=unicode.encode('utf-8')
print str
f=open(logfname,mode)
f.write(str+"\n")
f.close()
-def Commonlogex(type,place,inst,txt):
+def Commonlogex(type,place,inst,txt=""):
lt=datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")+u":"
- lt=lt+u"["+type+u"] "+place+u" "+inst+u"\n"+txt
+ if txt=="":
+ lt=lt+u"["+type+u"] "+place+u" "+inst
+ else:
+ lt=lt+u"["+type+u"] "+place+u" "+inst+u"\n"+txt
lt=lt.encode('utf-8')
logfname="/var/log/rec10"
mode="a"
f=open(logfname,mode)
f.write(lt+"\n")
f.close()
-def addCommandLog(tspath,log_title,cmd,cmd_log):
+def addCommandLog(tspath,log_title,cmd,cmd_log=""):
addlog(tspath,cmd,log_title+u"ログ-コマンド")
addlog(tspath,cmd_log,log_title+u"ログ-詳細")
def addlog(tspath,txt,log_title):