able-ice-99180
08/02/2022, 7:30 PMprint
statements in my tasks, but not <http://logging.info|logging.info>
.
I was wondering what's needed to set up logging for GCP (GKE).
I found this document, but wasn't sure what settings would be appropriate for GCP. FIgured I'd check here first before diving too deep.
https://docs.flyte.org/projects/cookbook/en/latest/auto/deployment/configure_logging_links.html#sphx-glr-auto-deployment-configure-logging-links-py
Thank you!freezing-airport-6809
thankful-minister-83577
able-ice-99180
08/02/2022, 9:20 PMable-ice-99180
08/03/2022, 10:49 AM@workflow
function is good for me.
@workflow
def my_wf(a: int, b: str) -> Tuple[int, str]:
logging.basicConfig(
format="%(asctime)s %(levelname)-8s %(module)s - %(funcName)s: %(message)s",
level=<http://logging.INFO|logging.INFO>,
datefmt="%Y-%m-%d %H:%M:%S"
)
able-ice-99180
08/03/2022, 10:50 AMfreezing-airport-6809
able-ice-99180
08/03/2022, 1:46 PMlogging.basicConfig(...)
should not have solved the issue then?freezing-airport-6809
freezing-airport-6809
able-ice-99180
08/03/2022, 2:04 PMthankful-minister-83577
able-ice-99180
08/03/2022, 2:13 PMthankful-minister-83577
thankful-minister-83577
thankful-minister-83577
thankful-minister-83577
thankful-minister-83577
thankful-minister-83577
thankful-minister-83577
FLYTE_SDK_LOGGING_LEVEL
env var. just set that to 10 and you should get everything including debugthankful-minister-83577
thankful-minister-83577
able-ice-99180
08/03/2022, 2:19 PMFLYTE_SDK_LOGGING_LEVEL
?orange-mouse-19402
01/03/2023, 10:37 PMfrom flytekit.loggers import logger as flyte_logger, user_space_logger
and using it like a standard python logger. It doesn’t work, and I have to resort to print statements everywhere in my code.freezing-airport-6809
orange-mouse-19402
01/06/2023, 6:05 PMBasicConfig(force=True)