##// END OF EJS Templates
logging: use lazy formatting of log entries
marcink -
r541:3e5cbdba default
parent child Browse files
Show More
@@ -144,7 +144,7 b' class VCS(object):'
144
144
145 def _configure_locale(self):
145 def _configure_locale(self):
146 if self.locale:
146 if self.locale:
147 log.info('Settings locale: `LC_ALL` to %s' % self.locale)
147 log.info('Settings locale: `LC_ALL` to %s', self.locale)
148 else:
148 else:
149 log.info(
149 log.info(
150 'Configuring locale subsystem based on environment variables')
150 'Configuring locale subsystem based on environment variables')
@@ -58,7 +58,7 b' class LRUDictDebug(LRUDict):'
58 fmt = '\n'
58 fmt = '\n'
59 for cnt, elem in enumerate(self.keys()):
59 for cnt, elem in enumerate(self.keys()):
60 fmt += '%s - %s\n' % (cnt+1, safe_str(elem))
60 fmt += '%s - %s\n' % (cnt+1, safe_str(elem))
61 log.debug('current LRU keys (%s):%s' % (elems_cnt, fmt))
61 log.debug('current LRU keys (%s):%s', elems_cnt, fmt)
62
62
63 def __getitem__(self, key):
63 def __getitem__(self, key):
64 self._report_keys()
64 self._report_keys()
@@ -46,10 +46,8 b' class RequestWrapperTween(object):'
46 finally:
46 finally:
47 end = time.time()
47 end = time.time()
48
48
49 log.info('IP: %s Request to path: `%s` time: %.3fs' % (
49 log.info('IP: %s Request to path: `%s` time: %.3fs',
50 '127.0.0.1',
50 '127.0.0.1', safe_str(get_access_path(request)), end - start)
51 safe_str(get_access_path(request)), end - start)
52 )
53
51
54 return response
52 return response
55
53
General Comments 0
You need to be logged in to leave comments. Login now