Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Used command
black django_structlog django_structlog_demo_project
- Loading branch information
1 parent
6a346db
commit d7d9b8b
Showing
22 changed files
with
261 additions
and
223 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,4 @@ | |
|
||
|
||
class DjangoStructLogConfig(AppConfig): | ||
name = 'django_structlog' | ||
name = "django_structlog" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,4 @@ | ||
from .request import ( # noqa F401 | ||
RequestMiddleware, | ||
) | ||
from .request import RequestMiddleware # noqa F401 | ||
|
||
# noinspection PyUnresolvedReferences | ||
from ..celery.middlewares import ( # noqa F401 | ||
CeleryMiddleware, | ||
) | ||
from ..celery.middlewares import CeleryMiddleware # noqa F401 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,27 @@ | ||
import structlog | ||
from django.http import HttpResponse | ||
from django_structlog_demo_project.taskapp.celery import successful_task, failing_task, nesting_task | ||
from django_structlog_demo_project.taskapp.celery import ( | ||
successful_task, | ||
failing_task, | ||
nesting_task, | ||
) | ||
|
||
logger = structlog.get_logger(__name__) | ||
|
||
|
||
def enqueue_successful_task(request): | ||
logger.info("Enqueuing successful task") | ||
successful_task.delay(foo='bar') | ||
successful_task.delay(foo="bar") | ||
return HttpResponse(status=201) | ||
|
||
|
||
def enqueue_failing_task(request): | ||
logger.info("Enqueuing failing task") | ||
failing_task.delay(foo='bar') | ||
failing_task.delay(foo="bar") | ||
return HttpResponse(status=201) | ||
|
||
|
||
def enqueue_nesting_task(request): | ||
logger.info("Enqueuing nesting task") | ||
nesting_task.delay() | ||
return HttpResponse(status=201) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
default_app_config = 'django_structlog_demo_project.test_app.apps.TestAppConfig' | ||
default_app_config = "django_structlog_demo_project.test_app.apps.TestAppConfig" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.