From 31c2e23c4c3e2933952d5851bd5c97eb336258dd Mon Sep 17 00:00:00 2001 From: mathieui Date: Sat, 3 Aug 2013 19:27:25 +0200 Subject: 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. --- src/tabs.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/tabs.py') 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, -- cgit v1.2.3