'Log the given message. Append the last traceback if requested.'

def log(self, msg='', level=20, traceback=False):

    if traceback:
        msg += ('\n' + ''.join(_traceback.format_exception(*sys.exc_info())))
    self.publish('log', msg, level)
