Jacob Blanco
04/15/2020, 11:23 PMChris White
04/15/2020, 11:30 PMtoml
configuration file for many things such as this (more here: https://docs.prefect.io/core/concepts/configuration.html)
1. To change the timestamp format you can overwrite this variable in Prefect’s configuration: https://github.com/PrefectHQ/prefect/blob/master/src/prefect/config.toml#L82
Note that you can do this through a user file or an environment variable PREFECT__LOGGING__FORMAT
2. Similarly, you can update the Logging Level via a user configuration file or environment variable PREFECT__LOGGING__LEVEL
.
Because the loggers are configured at import time, you’ll need to set these variables prior to running the Flow in a python processJacob Blanco
04/15/2020, 11:36 PMdatefmt
. Am I missing something?
The log config for {logging} looks something like this:
"formatters": {
"datadog": {
"class": "logging.Formatter",
"datefmt": "%Y-%m-%d %H:%M:%S.000000%z",
"format": "%(asctime)s %(levelname)s %(name)s: %(message)s"
}
},
Are datefmt
and format
"merged" in the Prefect config?Chris White
04/15/2020, 11:44 PMdatefmt
as a configuration option as well; I can get that in for our next release (which will go out next week).
In the meantime you will need to manually configure this on the prefect loggerJacob Blanco
04/15/2020, 11:45 PMChris White
04/15/2020, 11:46 PMJacob Blanco
04/16/2020, 12:01 AMChris White
04/16/2020, 12:02 AMflow.run()
) you could run this configuration step just before flow.run