'Determine if the exception-logging mechanism is enabled.
Returns
exclog : bool
True if exception logging is on, False if not.'

def exception_logging_enabled(self):

    try:
        ip = get_ipython()
    except NameError:
        ip = None
    if (ip is None):
        return (self._excepthook_orig is not None)
    else:
        return (_AstLogIPYExc in ip.custom_exceptions)
