More coherent logging levels and messages
Tails developers
8 years ago
219 | 219 | |
220 | 220 | :returns: **False** |
221 | 221 | """ |
222 | logging.debug("Controller initialized") | |
222 | logging.info("controller connected") | |
223 | 223 | self._path.set_sensitive(True) |
224 | 224 | self._treeview.set_sensitive(True) |
225 | 225 | self._infobar_label.set_text(_("Connected to the Tor daemon! " |
242 | 242 | **True** if we failed to reconnect (so that GLib.timeout_add will call |
243 | 243 | the method again). |
244 | 244 | """ |
245 | logging.debug("Trying to reconnect the controller") | |
245 | logging.debug("trying to reconnect the controller") | |
246 | 246 | try: |
247 | 247 | self.controller.connect() |
248 | 248 | self.controller.authenticate() |
262 | 262 | **True** if we failed to connect (so that GLib.timeout_add will call |
263 | 263 | the method again). |
264 | 264 | """ |
265 | logging.debug("Trying to connect the controller") | |
265 | logging.debug("trying to connect the controller") | |
266 | 266 | controller = self.get_application().connect_controller() |
267 | 267 | if controller: |
268 | 268 | self.controller = controller |
287 | 287 | # It may happen that the treeiter is not valid anymore |
288 | 288 | # e.g. because it represents a stream that has been remapped |
289 | 289 | # to another circuit. |
290 | logging.debug("cannot remove %s which is not valid") | |
290 | logging.warn("cannot remove %s which is not valid") | |
291 | 291 | return False # to cancel the repetition when used in timeout_add |
292 | 292 | |
293 | 293 | # Circuits |
327 | 327 | |
328 | 328 | :var stem.response.events.CircuitEvent circuit: the circuit |
329 | 329 | """ |
330 | logging.debug("updating circuit %s" % circuit) | |
330 | logging.debug("updating circuit %s" % circuit.id) | |
331 | 331 | if circuit.reason: |
332 | 332 | status = _("%s: %s") % (str(circuit.status).capitalize(), |
333 | 333 | str(circuit.reason).lower()) |
396 | 396 | return None |
397 | 397 | circ_iter = self._circ_to_iter[stream.circ_id] |
398 | 398 | if not circ_iter: |
399 | logging.warn("No iter found for %s" % circ_id) | |
399 | logging.warn("no iter found for %s" % circ_id) | |
400 | 400 | circ_iter = self.add_circuit(self.controller.get_circuit(circ_id)) |
401 | 401 | stream_iter = self._treestore.append(circ_iter, |
402 | 402 | [self.TYPE_STREAM, |
499 | 499 | try: |
500 | 500 | circuit = self.controller.get_circuit(circ_id) |
501 | 501 | except ValueError as e: # The circuit doesn't exist anymore |
502 | logging.debug("circuit %s not known by Tor: %s" % (circ_id, e)) | |
502 | logging.warn("circuit %s not known by Tor: %s" % (circ_id, e)) | |
503 | 503 | return False |
504 | 504 | self.show_circuit_details(circuit) |
505 | 505 | return False |