Browse Source

more consistent output

David Rose 17 years ago
parent
commit
2a5851d614
1 changed files with 7 additions and 7 deletions
  1. 7 7
      direct/src/directnotify/Notifier.py

+ 7 - 7
direct/src/directnotify/Notifier.py

@@ -123,9 +123,9 @@ class Notifier:
         """
         """
         message = str(errorString)
         message = str(errorString)
         if Notifier.showTime:
         if Notifier.showTime:
-            string = (self.getTime() + str(exception) + ": " + self.__name + ": " + message)
+            string = (self.getTime() + str(exception) + ": " + self.__name + "(error): " + message)
         else:
         else:
-            string = (str(exception) + ": " + self.__name + ": " + message)
+            string = (str(exception) + ": " + self.__name + "(error): " + message)
         self.__log(string)
         self.__log(string)
         raise exception(errorString)
         raise exception(errorString)
 
 
@@ -139,7 +139,7 @@ class Notifier:
             if Notifier.showTime:
             if Notifier.showTime:
                 string = (self.getTime() + self.__name + '(warning): ' + message)
                 string = (self.getTime() + self.__name + '(warning): ' + message)
             else:
             else:
-                string = (":" + self.__name + 'warning: ' + message)
+                string = (":" + self.__name + '(warning): ' + message)
             self.__log(string)
             self.__log(string)
             self.__print(string)
             self.__print(string)
         return 1 # to allow assert myNotify.warning("blah")
         return 1 # to allow assert myNotify.warning("blah")
@@ -164,9 +164,9 @@ class Notifier:
         if self.__debug:
         if self.__debug:
             message = str(debugString)
             message = str(debugString)
             if Notifier.showTime:
             if Notifier.showTime:
-                string = (self.getTime() + self.__name + ':debug: ' + message)
+                string = (self.getTime() + self.__name + '(debug): ' + message)
             else:
             else:
-                string = (':' + self.__name + ':debug: ' + message)
+                string = (':' + self.__name + '(debug): ' + message)
             self.__log(string)
             self.__log(string)
             self.__print(string)
             self.__print(string)
         return 1 # to allow assert myNotify.debug("blah")
         return 1 # to allow assert myNotify.debug("blah")
@@ -191,9 +191,9 @@ class Notifier:
         if self.__info:
         if self.__info:
             message = str(infoString)
             message = str(infoString)
             if Notifier.showTime:
             if Notifier.showTime:
-                string = (self.getTime() + self.__name + ':info: ' + message)
+                string = (self.getTime() + self.__name + ': ' + message)
             else:
             else:
-                string = (':' + self.__name + ':info: ' + message)
+                string = (':' + self.__name + ': ' + message)
             self.__log(string)
             self.__log(string)
             self.__print(string)
             self.__print(string)
         return 1 # to allow assert myNotify.info("blah")
         return 1 # to allow assert myNotify.info("blah")