-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Modify django output streams based on log levels #1163
base: master
Are you sure you want to change the base?
Modify django output streams based on log levels #1163
Conversation
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PEP8 stuff
@@ -1,7 +1,11 @@ | |||
import os | |||
from celery import Celery | |||
from celery import Celery, signals |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
separate imports to separate lines, please :)
@@ -149,6 +151,11 @@ | |||
|
|||
STATIC_ROOT = os.path.join(BASE_DIR, 'static-root') | |||
|
|||
class _ExcludeErrorsFilter(logging.Filter): | |||
def filter(self, record): | |||
#Exclude log messages with log level ERROR or higher. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change comment like this:
def filter(self, record):
"""Exclude log messages with log level ERROR or higher."""
from kombu import Queue | ||
|
||
@signals.setup_logging.connect |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PEP 8: expected 2 blank lines, found 1
@@ -149,6 +151,11 @@ | |||
|
|||
STATIC_ROOT = os.path.join(BASE_DIR, 'static-root') | |||
|
|||
class _ExcludeErrorsFilter(logging.Filter): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PEP 8: expected 2 blank lines, found 1
@@ -149,6 +151,11 @@ | |||
|
|||
STATIC_ROOT = os.path.join(BASE_DIR, 'static-root') | |||
|
|||
class _ExcludeErrorsFilter(logging.Filter): | |||
def filter(self, record): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PEP 8: indentation is not a multiple of four
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't use spaces :P use tabs
class _ExcludeErrorsFilter(logging.Filter): | ||
def filter(self, record): | ||
#Exclude log messages with log level ERROR or higher. | ||
return record.levelno < 40 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PEP 8: expected 2 blank lines after class or function definition, found 1
No description provided.