Minimal change to allow Google Fonts to easily capture subset timings serverside via log handler.

This commit is contained in:
Rod Sheeter 2016-05-11 12:59:37 -07:00
parent a796b03366
commit 74e7400097

View File

@ -348,7 +348,10 @@ class Timer(object):
# the with-statement, exit without logging the time
return
message = self.formatTime(self.msg, time)
self.logger.log(self.level, message)
# Allow log handlers to see the individual parts to facilitate things
# like a server accumulating aggregate stats.
msg_parts = { 'msg': self.msg, 'time': time }
self.logger.log(self.level, message, msg_parts)
def __call__(self, func_or_msg=None, **kwargs):
""" If the first argument is a function, return a decorator which runs