summaryrefslogtreecommitdiff
path: root/src/tabs.py
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2013-08-03 19:27:25 +0200
committermathieui <mathieui@mathieui.net>2013-08-03 19:27:25 +0200
commit31c2e23c4c3e2933952d5851bd5c97eb336258dd (patch)
treecb0ea7fe4d749c8a47e0457b42bbf9353fa24926 /src/tabs.py
parentc2f6ece39db14ba87ad33d6a7103193cf2e64050 (diff)
downloadpoezio-31c2e23c4c3e2933952d5851bd5c97eb336258dd.tar.gz
poezio-31c2e23c4c3e2933952d5851bd5c97eb336258dd.tar.bz2
poezio-31c2e23c4c3e2933952d5851bd5c97eb336258dd.tar.xz
poezio-31c2e23c4c3e2933952d5851bd5c97eb336258dd.zip
Logs errors by default, in a dedicated file
- log_errors option, true by default - errors go in log_dir/errors.log (so $XDG_DATA_HOME/errors.log by default) This should help a lot for debugging, and provide a way for people to easily give debug traces without useless or personal infos.
Diffstat (limited to 'src/tabs.py')
-rw-r--r--src/tabs.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/tabs.py b/src/tabs.py
index 6a97e476..80182a52 100644
--- a/src/tabs.py
+++ b/src/tabs.py
@@ -544,6 +544,7 @@ class ChatTab(Tab):
ET.fromstring(arg)
except:
self.core.information('Could not send custom xhtml', 'Error')
+ log.error('/xhtml: Unable to send custom xhtml', exc_info=True)
return
msg = self.core.xmpp.make_message(self.get_dest_jid())
@@ -1917,7 +1918,7 @@ class PrivateTab(ChatTab):
user=user, jid=self.core.xmpp.boundjid, nickname=self.own_nick)
replaced = True
except:
- pass
+ log.error('Unable to correct a message', exc_info=True)
if not replaced:
self.add_message(msg['body'],
@@ -2638,6 +2639,7 @@ class RosterInfoTab(Tab):
handle.close()
except IOError:
self.core.information('Could not open %s' % filepath, 'Error')
+ log.error('Unable to correct a message', exc_info=True)
return
for jid in lines:
self.command_add(jid.lstrip('\n'))
@@ -3107,7 +3109,7 @@ class ConversationTab(ChatTab):
nickname=self.core.own_nick)
replaced = True
except:
- pass
+ log.error('Unable to correct a message', exc_info=True)
if not replaced:
self.add_message(msg['body'],
nickname=self.core.own_nick,