Skip to content

Commit

Permalink
Remove attr magic as it causes too many issues
Browse files Browse the repository at this point in the history
  • Loading branch information
dcramer committed Jan 26, 2012
1 parent ff06ba4 commit 256f278
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 9 deletions.
4 changes: 4 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
1.1.5

* Remove logging attr magic.

1.1.4

* Correct encoding behavior on bool and float types.
Expand Down
2 changes: 0 additions & 2 deletions raven/contrib/django/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@


class SentryHandler(BaseSentryHandler):
reserved = BaseSentryHandler.reserved + ['request']

def __init__(self):
logging.Handler.__init__(self)

Expand Down
7 changes: 1 addition & 6 deletions raven/handlers/logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@


class SentryHandler(logging.Handler, object):
reserved = ['threadName', 'name', 'thread', 'created', 'process', 'processName', 'args', 'module',
'filename', 'levelno', 'exc_text', 'pathname', 'lineno', 'msg', 'exc_info', 'funcName',
'relativeCreated', 'levelname', 'msecs', 'data', 'stack', 'message']

def __init__(self, *args, **kwargs):
if len(args) == 1:
self.client = args[0]
Expand Down Expand Up @@ -60,11 +56,10 @@ def emit(self, record):
pass

def _emit(self, record, **kwargs):
# {'threadName': 'MainThread', 'name': 'foo', 'thread': 140735216916832, 'created': 1319164393.308008, 'process': 89141, 'processName': 'MainProcess', 'args': (), 'module': 'Unknown module', 'filename': None, 'levelno': 20, 'exc_text': None, 'pathname': None, 'lineno': None, 'msg': 'test', 'exc_info': (None, None, None), 'funcName': None, 'relativeCreated': 3441.9949054718018, 'levelname': 'INFO', 'msecs': 308.00795555114746}
data = {}

for k, v in record.__dict__.iteritems():
if k in self.reserved:
if '.' not in k:
continue
data[k] = v

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

setup(
name='raven',
version='1.1.4',
version='1.1.5',
author='David Cramer',
author_email='[email protected]',
url='http://github.com/dcramer/raven',
Expand Down

0 comments on commit 256f278

Please sign in to comment.