Skip to content

Error when attempting to overwrite exc_info #13

@maraujop

Description

@maraujop

Hi Zain,

I was trying to use jogging with django-sentry. This were my settings:

from sentry.client.handlers import SentryHandler
import logging

GLOBAL_LOG_LEVEL = logging.INFO
GLOBAL_LOG_HANDLERS = [SentryHandler()]

I one view I'm doing:

logging.info("I'm an info message", exc_info=sys.exc_info(), extra={'url': request.build_absolute_uri()})

I'm getting this stacktrace:

build/bdist.linux-x86_64/egg/jogging/__init__.py in info
        self.log('info', msg, caller, *args, **kwargs) ...

build/bdist.linux-x86_64/egg/jogging/__init__.py in log
            logger.log(level=self.LOGGING_LEVELS[level], msg=msg, extra=kwargs, *args) ...

/usr/lib/python2.6/logging/__init__.py in log
            self._log(level, msg, args, **kwargs) ...

/usr/lib/python2.6/logging/__init__.py in _log
        record = self.makeRecord(self.name, level, fn, lno, msg, args, exc_info, func, extra) ...

/usr/lib/python2.6/logging/__init__.py in makeRecord
                    raise KeyError("Attempt to overwrite %r in LogRecord" % key)

I hope It can be fixed, as I love the fine granularity easy control that jogging provides, thanks
Miguel Araujo

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions