Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bartoszbetka
Copy link
Contributor

No description provided.

@claassistantio
Copy link

claassistantio commented Jan 29, 2020

CLA assistant check)
Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement) before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck) it.

Copy link
Contributor

@Jakub89 Jakub89 left a 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
Copy link
Contributor

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.
Copy link
Contributor

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
Copy link
Contributor

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):
Copy link
Contributor

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):
Copy link
Contributor

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

Copy link
Contributor

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
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants