##// END OF EJS Templates
blackbox: change the way of deactivating the logger on write error...
Yuya Nishihara -
r40791:eb5948f2 default
parent child Browse files
Show More
@@ -159,7 +159,7 b' class blackboxlogger(object):'
159 159
160 160 def _log(self, ui, event, msg, opts):
161 161 if self._inlog:
162 # recursion and failure guard
162 # recursion guard
163 163 return
164 164 self._inlog = True
165 165 default = ui.configdate('devel', 'default-date')
@@ -185,10 +185,10 b' class blackboxlogger(object):'
185 185 with _openlogfile(ui, self._bbvfs) as fp:
186 186 fp.write(fmt % args)
187 187 except (IOError, OSError) as err:
188 # deactivate this to avoid failed logging again
189 self._repo = None
188 190 ui.debug('warning: cannot write to blackbox.log: %s\n' %
189 191 encoding.strtolocal(err.strerror))
190 # do not restore _inlog intentionally to avoid failed
191 # logging again
192 192 else:
193 193 self._inlog = False
194 194
General Comments 0
You need to be logged in to leave comments. Login now