Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions source/logHandler.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#logHandler.py
#A part of NonVisual Desktop Access (NVDA)
#Copyright (C) 2007-2018 NV Access Limited, Rui Batista, Joseph Lee
#Copyright (C) 2007-2019 NV Access Limited, Rui Batista, Joseph Lee, Leonard de Ruijter
#This file is covered by the GNU General Public License.
#See the file COPYING for more details.

Expand Down Expand Up @@ -139,7 +139,7 @@ def _log(self, level, msg, args, exc_info=None, extra=None, codepath=None, activ
msg += ("\nStack trace:\n"
+ stripBasePathFromTracebackText("".join(traceback.format_list(stack_info)).rstrip()))

res = logging.Logger._log(self,level, msg, args, exc_info, extra)
res = super()._log(level, msg, args, exc_info, extra)

if activateLogViewer:
# Make the log text we just wrote appear in the log viewer.
Expand Down Expand Up @@ -259,9 +259,11 @@ def redirectStdout(logger):
sys.stdout = StreamRedirector("stdout", logger, logging.WARNING)
sys.stderr = StreamRedirector("stderr", logger, logging.ERROR)

# Register our logging class as the class for all loggers.
logging.setLoggerClass(Logger)
#: The singleton logger instance.
#: @type: L{Logger}
log = Logger("nvda")
log = logging.getLogger("nvda")

def _getDefaultLogFilePath():
if getattr(sys, "frozen", None):
Expand Down