Skip to content

Commit

Permalink
offline logger to match cads-worker (#267)
Browse files Browse the repository at this point in the history
* offline logger to match cads-worker
  • Loading branch information
EddyCMWF authored Feb 5, 2025
1 parent abe1ba0 commit 3116b6b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
10 changes: 2 additions & 8 deletions cads_adaptors/tools/logger.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
# TODO: use a better logger, where better means standardised to cads logs in terms of formatting
import logging
import os
import structlog

logger = logging.getLogger("adaptors")
logger.setLevel(os.getenv("ADAPTORS_LOG_LEVEL", "DEBUG"))
ch = logging.StreamHandler()

logger.addHandler(ch)
logger = structlog.getLogger(__name__)
1 change: 1 addition & 0 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ dependencies:
- pyyaml
- requests
- sqlalchemy
- structlog
- tabulate
- tqdm
- xarray
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ dependencies = [
# Only mandatory dependencies required by the broker and retrieve-api images
"DateTimeRange",
"python-dateutil",
"structlog",
"jsonschema"
]
description = "CADS data retrieve utilities to be used by adaptors"
Expand Down

0 comments on commit 3116b6b

Please sign in to comment.