]> arthur.barton.de Git - netdata.git/commitdiff
error messages
authorpaulfantom <paulfantom@gmail.com>
Fri, 1 Jul 2016 11:40:58 +0000 (13:40 +0200)
committerpaulfantom <paulfantom@gmail.com>
Fri, 1 Jul 2016 11:40:58 +0000 (13:40 +0200)
python.d/python_modules/base.py

index 0a52350c090fb56099c2ce9570fa117735721962..6958eb8e228cc920d731d682b45cd53aece0f5b8 100644 (file)
@@ -453,16 +453,14 @@ class LogService(SimpleService):
         return None
 
     def check(self):
-        if self.name is None or self.name == str(None):
-            self.error("Log service doesn't have name.")
-            return False
+        if self.name is not None or self.name != str(None):
+            self.name = ""
         else:
             self.name = str(self.name)
         try:
             self.log_path = str(self.configuration['path'])
         except (KeyError, TypeError):
-            self.error("Malformed path to log: '" + self.log_path + "'")
-            return False
+            self.error("No path to log specified. Using: '" + self.log_path + "'")
 
         # FIXME Remove preventing of frequent log parsing
         if self.update_every < 3:
@@ -471,5 +469,5 @@ class LogService(SimpleService):
         if os.access(self.log_path, os.R_OK):
             return True
         else:
-            self.error("Cannot access file. No read permission.")
+            self.error("Cannot access file: '" + self.log_path + "'")
             return False