Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
PREFECT_LOGGING_EXTRA_LOGGERS=data_validation
2 changes: 1 addition & 1 deletion .github/workflows/publish-ghcr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ name: Create and publish a Docker image
# Configures this workflow to run every time a change is pushed to the branch called `release`.
on:
push:
branches: ["main"]
branches: ["logging"]

# Defines two custom environment variables for the workflow. These are used for the Container registry domain, and a name for the Docker image that this workflow builds.
env:
Expand Down
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ RUN apt-get -y update && \

COPY pixi.toml .
COPY pixi.lock .
COPY .env .
# use `--locked` to ensure the lockfile is up to date with pixi.toml
RUN pixi install --locked
# create the shell-hook bash script to activate the environment
Expand Down
11 changes: 11 additions & 0 deletions data_validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
from prefect.blocks.system import Secret
import time as ttime
from tiled.client import from_profile
import logging

logger2 = logging.getLogger(__name__)
logger2.setLevel("INFO")


@task(retries=2, retry_delay_seconds=10)
Expand All @@ -23,6 +27,13 @@ def read_all_streams(uid, beamline_acronym):
logger.info(f"{elapsed_time = }")


@task(log_prints=True)
def test_print():
print(f"name of Logger: {logger2.name}")
logger2.warning("logging testtesttest")


@flow
def data_validation(uid):
test_print()
read_all_streams(uid, beamline_acronym="tst")
Loading
Loading