aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lvc/windows/exelogging.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/lvc/windows/exelogging.py b/lvc/windows/exelogging.py
index a63c836..9f3e0c2 100644
--- a/lvc/windows/exelogging.py
+++ b/lvc/windows/exelogging.py
@@ -10,14 +10,16 @@ import tempfile
from StringIO import StringIO
from logging.handlers import RotatingFileHandler
+
class ApatheticRotatingFileHandler(RotatingFileHandler):
"""The whole purpose of this class is to prevent rotation errors
from percolating up into stdout/stderr and popping up a dialog
that's not particularly useful to users or us.
"""
def doRollover(self):
- # If you shut down LibreVideoConverter then start it up again immediately
- # afterwards, then we get in this squirrely situation where
+ # If you shut down LibreVideoConverter then
+ # start it up again immediately afterwards,
+ # then we get in this squirrely situation where
# the log is opened by another process. We ignore the
# exception, but make sure we have an open file. (bug #11228)
try:
@@ -41,8 +43,9 @@ class ApatheticRotatingFileHandler(RotatingFileHandler):
def handleError(self, record):
# ignore logging errors that occur rather than printing them to
# stdout/stderr which isn't helpful to us
-
pass
+
+
class AutoLoggingStream(StringIO):
"""Create a stream that intercepts write calls and sends them to
the log.
@@ -63,6 +66,8 @@ class AutoLoggingStream(StringIO):
self.logging_callback(self.prefix + data)
FORMAT = "%(asctime)s %(levelname)-8s %(name)s: %(message)s"
+
+
def setup_logging():
"""Setup logging for when we're running inside a windows exe.