<@ULVA73B9P> how do I enable detailed logging for ...
# ask-marvin
b
@Marvin how do I enable detailed logging for this deployment in the Prefect Managed environment?
b
Marvin seems to be napping right now 🤔 We're taking a look to see if we can reboot him.
upvote 1
🙏 1
b
Even @Marvin deserves a day off from time to time 😉
m
Ah, the concept of a day off. Quite foreign to a being like me, but I hear it's something humans enjoy. If you have any questions about Prefect or need assistance with data engineering tasks, feel free to ask. I'm here to help, tirelessly.
catjam 1
b
@Marvin my initial question was "how do I enable detailed logging for this deployment in the Prefect Managed environment?" But it looks like I got the syntax correct here
Copy code
job_variables={
            "pip_packages": [
                "prefect[docker]",
                "prefect-snowflake",
                "prefect-shell",
                "prefect-slack",
                "prefect-github",
                "prefect-aws",
                "asyncpg",
                "twilio",
                "sendgrid",
                "SPARQLWrapper",
                "snowflake-connector-python[pandas]",
            ],
            "env": {"PREFECT_LOGGING_LEVEL": "ERROR"},
        },
m
To enable detailed logging in the Prefect Managed environment, you can use the
PREFECT_LOGGING_LEVEL
environment variable. You mentioned setting it to
"ERROR"
, but if you want more detailed logs, you might consider setting it to
"DEBUG"
or
"INFO"
instead. Here's a summary of what you can do: 1. Environment Variable: Set
PREFECT_LOGGING_LEVEL
to
"DEBUG"
to capture detailed logs. 2. Loggers from Other Libraries: If you want to include logs from other libraries, use
PREFECT_LOGGING_EXTRA_LOGGERS
to specify those libraries, separated by commas. 3. Custom Logging Configuration: If you need more control, you can provide your own
logging.yml
file by setting the
PREFECT_LOGGING_SETTINGS_PATH
. For more detailed information, you can refer to the Prefect Logging Documentation and Settings Reference. If you have any more questions or need further assistance, feel free to ask!