summaryrefslogtreecommitdiff
path: root/src/leap/bitmask/app.py
diff options
context:
space:
mode:
authorTomás Touceda <chiiph@leap.se>2013-10-18 09:34:47 -0300
committerTomás Touceda <chiiph@leap.se>2013-10-18 09:34:47 -0300
commita06b5719f028e619a4b3800fb346ed3c984e4d25 (patch)
treeb177a28201d647731797efb25c19fd9b3a311c9a /src/leap/bitmask/app.py
parent932dcf596177b93c0b0f9e876be74be314fb6037 (diff)
parentf673b84a9a9b0fea3f6bbfefbb38cbd3d311cf3c (diff)
Merge branch 'release-0.3.5'
Diffstat (limited to 'src/leap/bitmask/app.py')
-rw-r--r--src/leap/bitmask/app.py19
1 files changed, 12 insertions, 7 deletions
diff --git a/src/leap/bitmask/app.py b/src/leap/bitmask/app.py
index c1859478..40a77075 100644
--- a/src/leap/bitmask/app.py
+++ b/src/leap/bitmask/app.py
@@ -54,6 +54,7 @@ from leap.bitmask.util import leap_argparse
from leap.bitmask.util import log_silencer
from leap.bitmask.util.leap_log_handler import LeapLogHandler
from leap.bitmask.util.streamtologger import StreamToLogger
+from leap.bitmask.platform_init import IS_WIN
from leap.common.events import server as event_server
import codecs
@@ -99,7 +100,8 @@ def add_logger_handlers(debug=False, logfile=None):
logger = logging.getLogger(name='leap')
logger.setLevel(level)
- log_format = '%(asctime)s - %(name)s - %(levelname)s - %(message)s'
+ log_format = ('%(asctime)s - %(name)s:%(funcName)s:L#%(lineno)s '
+ '- %(levelname)s - %(message)s')
formatter = logging.Formatter(log_format)
# Console handler
@@ -140,12 +142,15 @@ def replace_stdout_stderr_with_logging(logger):
- the twisted log output
with a custom one that writes to the logger.
"""
- sys.stdout = StreamToLogger(logger, logging.DEBUG)
- sys.stderr = StreamToLogger(logger, logging.ERROR)
-
- # Replace twisted's logger to use our custom output.
- from twisted.python import log
- log.startLogging(sys.stdout)
+ # Disabling this on windows since it breaks ALL THE THINGS
+ # The issue for this is #4149
+ if not IS_WIN:
+ sys.stdout = StreamToLogger(logger, logging.DEBUG)
+ sys.stderr = StreamToLogger(logger, logging.ERROR)
+
+ # Replace twisted's logger to use our custom output.
+ from twisted.python import log
+ log.startLogging(sys.stdout)
def main():