Browse Source

Update logging docs to disable propagate

David Cramer 14 years ago
parent
commit
31e435b981
1 changed files with 3 additions and 1 deletions
  1. 3 1
      README.rst

+ 3 - 1
README.rst

@@ -196,7 +196,9 @@ django-sentry supports the ability to directly tie into the ``logging`` module.
 	logging.getLogger().addHandler(SentryHandler())
 
 	# Add StreamHandler to sentry's default so you can catch missed exceptions
-	logging.getLogger('sentry.errors').addHandler(logging.StreamHandler())
+	logger = logging.getLogger('sentry.errors')
+	logger.propagate = False
+	logger.addHandler(logging.StreamHandler())
 
 You can also use the ``exc_info`` and ``extra=dict(url=foo)`` arguments on your ``log`` methods. This will store the appropriate information and allow django-sentry to render it based on that information::