mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2025-07-09 20:40:17 +02:00
Change logging imports and commands
Now uses `get_extension_logger` as is recommanded by https://allianceauth.readthedocs.io/en/v4.4.2/development/custom/logging.html
This commit is contained in:
parent
164cd4fbb2
commit
8d63801b00
@ -40,10 +40,10 @@ Please use the following approach to ensure your tasks are working properly with
|
|||||||
Here is an example implementation of a task:
|
Here is an example implementation of a task:
|
||||||
|
|
||||||
```python
|
```python
|
||||||
import logging
|
from allianceauth.services.hooks import get_extension_logger
|
||||||
from celery import shared_task
|
from celery import shared_task
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = get_extension_logger(__name__)
|
||||||
|
|
||||||
|
|
||||||
@shared_task
|
@shared_task
|
||||||
@ -80,10 +80,10 @@ However, many long-running tasks consist of several smaller processes that need
|
|||||||
Example implementation for a celery chain:
|
Example implementation for a celery chain:
|
||||||
|
|
||||||
```python
|
```python
|
||||||
import logging
|
from allianceauth.services.hooks import get_extension_logger
|
||||||
from celery import shared_task, chain
|
from celery import shared_task, chain
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = get_extension_logger(__name__)
|
||||||
|
|
||||||
|
|
||||||
@shared_task
|
@shared_task
|
||||||
|
Loading…
x
Reference in New Issue
Block a user