Amit
08/10/2020, 11:24 AMlogger = logging.getLogger(__name__)
I have this in code everywhere and I don't want replace it with from prefect.utilities.logging import get_logger
everywhere, is there a way to send the default logger messages to cloud?josh
08/10/2020, 2:33 PM@task
def my_task():
from prefect import context
logger = context.get("logger")
<http://logger.info|logger.info>("log this")
Alternatively you could log stdout and that will be sent to the cloud logger:
@task(log_stdout=True)
def my_task():
print("log this")
Amit
08/10/2020, 2:34 PMjosh
08/10/2020, 2:40 PMAmit
08/10/2020, 2:43 PMlogging.getLogger(__name__)
I guess, we need to use a common name thenjosh
08/10/2020, 2:49 PMAmit
08/10/2020, 2:52 PMjosh
08/10/2020, 2:54 PMMarvin
08/10/2020, 2:55 PMAmit
08/10/2020, 3:00 PM