Skip to content

Commit

Permalink
configure logger on worker initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
adamsachs committed Feb 20, 2024
1 parent 68c204a commit 0bee25b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/fides/api/tasks/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
from sqlalchemy.orm import Session

from fides.api.db.session import get_db_engine, get_db_session
from fides.api.util.logger import create_handler_dicts
from fides.api.util.logger import setup as setup_logging
from fides.config import CONFIG, FidesConfig

MESSAGING_QUEUE_NAME = "fidesops.messaging"
Expand Down Expand Up @@ -44,6 +46,11 @@ def _create_celery(config: FidesConfig = CONFIG) -> Celery:
"""
Returns a configured version of the Celery application
"""
setup_logging(config)
logger.bind(api_config=CONFIG.logging.json()).debug(
"Logger configuration options in use"
)

app = Celery(__name__)

celery_config: Dict[str, Any] = {
Expand Down

0 comments on commit 0bee25b

Please sign in to comment.