From 77b99210c1b36da8e3ff74a3bd0196b57ea04807 Mon Sep 17 00:00:00 2001 From: angelblue05 Date: Sun, 17 Jul 2016 18:27:54 -0500 Subject: [PATCH] Add error mode to logging --- resources/lib/utils.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/resources/lib/utils.py b/resources/lib/utils.py index fe281ef5..0339b149 100644 --- a/resources/lib/utils.py +++ b/resources/lib/utils.py @@ -47,8 +47,13 @@ class Logging(object): def log(self, msg, level=1): + extra = "" + if level == -1: + # Error mode + extra = "::ERROR" + if self._getLogLevel(level): - self._printMsg("EMBY %s" % self.title, msg) + self._printMsg("EMBY %s%s" % (self.title, extra), msg) # Initiate class for utils.py document logging log = Logging('Utils').log