Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(226)

Side by Side Diff: appengine/components/components/ereporter2/formatter.py

Issue 2013943002: Changing license header, again! (Closed) Base URL: git@github.com:luci/luci-py.git@master
Patch Set: Fixed third parties Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 # Copyright 2014 The LUCI Authors. All rights reserved. 1 # Copyright 2014 The LUCI Authors. All rights reserved.
2 # Use of this source code is governed by the Apache v2.0 license that can be 2 # Use of this source code is governed under the Apache License, Version 2.0
3 # found in the LICENSE file. 3 # that can be found in the LICENSE file.
4 4
5 """Adds logging formatException() filtering to reduce the file paths length in 5 """Adds logging formatException() filtering to reduce the file paths length in
6 error logged. 6 error logged.
7 """ 7 """
8 8
9 import logging 9 import logging
10 import os 10 import os
11 import re 11 import re
12 12
13 import webapp2 13 import webapp2
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 95
96 This is optional but helps reduce spam significantly so it is highly 96 This is optional but helps reduce spam significantly so it is highly
97 encouraged. 97 encouraged.
98 """ 98 """
99 for handler in logging.getLogger().handlers: 99 for handler in logging.getLogger().handlers:
100 # pylint: disable=W0212 100 # pylint: disable=W0212
101 formatter = handler.formatter or logging._defaultFormatter 101 formatter = handler.formatter or logging._defaultFormatter
102 if not isinstance(formatter, _Formatter): 102 if not isinstance(formatter, _Formatter):
103 # Prevent immediate recursion. 103 # Prevent immediate recursion.
104 handler.setFormatter(_Formatter(formatter)) 104 handler.setFormatter(_Formatter(formatter))
OLDNEW
« no previous file with comments | « appengine/components/components/ereporter2/config.py ('k') | appengine/components/components/ereporter2/formatter_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698