Skip to content

Commit

Permalink
Include milliseconds in log timestamps. Incubates #7163.
Browse files Browse the repository at this point in the history
  • Loading branch information
jcsteh committed May 12, 2017
2 parents f8d99ca + 66f2d64 commit ab1d1ef
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion source/logHandler.py
@@ -1,3 +1,9 @@
#logHandler.py
#A part of NonVisual Desktop Access (NVDA)
#Copyright (C) 2007-2016 NV Access Limited, Rui Batista
#This file is covered by the GNU General Public License.
#See the file COPYING for more details.

"""Utilities and classes to manage logging in NVDA"""

import os
Expand Down Expand Up @@ -301,7 +307,10 @@ def initialize(shouldDoRemoteLogging=False):
logging.addLevelName(Logger.DEBUGWARNING, "DEBUGWARNING")
logging.addLevelName(Logger.IO, "IO")
if not shouldDoRemoteLogging:
logFormatter=Formatter("%(levelname)s - %(codepath)s (%(asctime)s):\n%(message)s", "%H:%M:%S")
# This produces log entries such as the following:
# IO - inputCore.InputManager.executeGesture (09:17:40.724):
# Input: kb(desktop):v
logFormatter=Formatter("%(levelname)s - %(codepath)s (%(asctime)s.%(msecs)03d):\n%(message)s", "%H:%M:%S")
if globalVars.appArgs.secure:
# Don't log in secure mode.
logHandler = logging.NullHandler()
Expand Down

0 comments on commit ab1d1ef

Please sign in to comment.