Skip to content

Commit

Permalink
log user tracebacks in the kernel (INFO-level)
Browse files Browse the repository at this point in the history
  • Loading branch information
minrk committed Oct 14, 2012
1 parent 09759ed commit f36b568
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions IPython/zmq/ipkernel.py
Expand Up @@ -396,6 +396,10 @@ def execute_request(self, stream, ident, parent):
reply_content['engine_info'] = e_info
# reset after use
shell._reply_content = None

if 'traceback' in reply_content:
self.log.info("Exception in execute request:\n%s", '\n'.join(reply_content['traceback']))


# At this point, we can tell whether the main code execution succeeded
# or not. If it did, we proceed to evaluate user_variables/expressions
Expand Down Expand Up @@ -596,6 +600,7 @@ def apply_request(self, stream, ident, parent):

self.session.send(self.iopub_socket, u'pyerr', reply_content, parent=parent,
ident=self._topic('pyerr'))
self.log.info("Exception in apply request:\n%s", '\n'.join(reply_content['traceback']))
result_buf = []

if reply_content['ename'] == 'UnmetDependency':
Expand Down

0 comments on commit f36b568

Please sign in to comment.