[openrtm-commit:02454] r796 - trunk/OpenRTM-aist-Python/OpenRTM_aist

openrtm @ openrtm.org openrtm @ openrtm.org
2017年 2月 17日 (金) 14:27:13 JST


Author: miyamoto
Date: 2017-02-17 14:27:13 +0900 (Fri, 17 Feb 2017)
New Revision: 796

Modified:
   trunk/OpenRTM-aist-Python/OpenRTM_aist/LogstreamFile.py
   trunk/OpenRTM-aist-Python/OpenRTM_aist/Manager.py
Log:
[compat,bugfix] Modified LogstreamFile.py

Modified: trunk/OpenRTM-aist-Python/OpenRTM_aist/LogstreamFile.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/LogstreamFile.py	2017-02-17 04:10:48 UTC (rev 795)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/LogstreamFile.py	2017-02-17 05:27:13 UTC (rev 796)
@@ -176,13 +176,17 @@
       return True
 
     else:
-      fhdlr = logging.FileHandler(fname)
-      mhdlr = logging.handlers.MemoryHandler(1024,logging.NOTSET, fhdlr)
-      fhdlr.setFormatter(formatter)
-      mhdlr.set_name(f)
-      self.logger.addHandler(mhdlr)
-      self.handlers.append(mhdlr)
-      self.logger.setLevel(logging.NOTSET)
+      try:
+        fhdlr = logging.FileHandler(fname)
+        mhdlr = logging.handlers.MemoryHandler(1024,logging.NOTSET, fhdlr)
+        fhdlr.setFormatter(formatter)
+        mhdlr.set_name(f)
+        self.logger.addHandler(mhdlr)
+        self.handlers.append(mhdlr)
+        self.logger.setLevel(logging.NOTSET)
+      except:
+        pass
+      
       return True
 
   ##

Modified: trunk/OpenRTM-aist-Python/OpenRTM_aist/Manager.py
===================================================================
--- trunk/OpenRTM-aist-Python/OpenRTM_aist/Manager.py	2017-02-17 04:10:48 UTC (rev 795)
+++ trunk/OpenRTM-aist-Python/OpenRTM_aist/Manager.py	2017-02-17 05:27:13 UTC (rev 796)
@@ -1539,7 +1539,7 @@
       if logstream is None:
         self._rtcout.RTC_WARN("Logstream %s creation failed."%lstype)
         continue
-      self._rtcout.RTC_WARN("Logstream %s created."%lstype)
+      self._rtcout.RTC_INFO("Logstream %s created."%lstype)
       if not logstream.init(l):
         self._rtcout.RTC_WARN("Logstream %s init failed."%lstype)
       



openrtm-commit メーリングリストの案内