gentle-scientist-22504
09/19/2024, 4:10 PMjolly-florist-66728
09/19/2024, 4:10 PMimport logging
logging.basicConfig(level=logging.INFO)
Additionally, make sure to set the FLYTE_SDK_LOGGING_LEVEL
environment variable to 20
(which corresponds to INFO level) as mentioned in the GitHub Issue:
import os
os.environ["FLYTE_SDK_LOGGING_LEVEL"] = "20"
Would you like more details on configuring logging in Flyte?
Sources:
- Flyte Community Discussion
- GitHub Issue 👍 0 button 👎 0 button 💡 Hint: Mention @runllm in the thread for followups.gentle-scientist-22504
09/19/2024, 4:21 PMjolly-florist-66728
09/19/2024, 4:21 PMlogger.info
prints correctly, you need to configure the Flyte logger and the root logger properly. According to Flyte Community Discussion, you should set up the logging configuration before using the logger. Here's an example:
1. Set the FLYTE_SDK_LOGGING_LEVEL
environment variable:
import os
os.environ["FLYTE_SDK_LOGGING_LEVEL"] = "20" # INFO level
2. Configure the root logger:
import logging
logging.basicConfig(level=logging.INFO)
3. Use the Flyte logger:
from flytekit import logger
logger.info("This is an info message")
If you still face issues, ensure that the logging configuration is set before any logging calls are made. This is crucial as per the Flyte GitHub Issue.
Would you like more detailed steps or a code example?
Sources:
- Flyte Community Discussion
- Flyte GitHub Issue 👍 0 button 👎 0 button 💡 Hint: Mention @runllm in the thread for followups.