Hi all! I see a feature for logging stdout to the cloud console, but is there a similar feature for stderr?
I’m trying to integrate Prefect into a codebase with a lot of existing C++ utilities that use glog for logging, and I’m having trouble getting the logs for these utils to show up in the console.
k
Kevin Kho
08/12/2021, 4:50 PM
Hey @hunter, I think the answer here is unfortunately not. You could open a feature request in the repo, but I don’t know when the team would get to it.
It also seems like extra loggers won’t work because I assume those logs are not the Python logger. I’ll look into it a bit and see what I find
h
hunter
08/12/2021, 4:51 PM
Yeah exactly I looked at extra loggers but it didn’t look like it would fit without a lot of hacking 😞
That’s unfortunate, but thank you for checking.
hunter
08/12/2021, 4:52 PM
Hm. It looks like it might be an easy change…
k
Kevin Kho
08/12/2021, 4:52 PM
What do you think of something like this if you can get the Prefect logger and add a handler?
Ooh. That might work too, I can give that a go. Does that need to be done on every task, or is there a way to set some kind of handler once on the flow?
hunter
08/12/2021, 4:55 PM
Slash what are best practices for extra loggers if I’m uploading my Flows via pickle?
k
Kevin Kho
08/12/2021, 4:56 PM
I believe every task if you store your flow in pickle based storage. It might work on the flow level if you store your flow in script based storage.
h
hunter
08/12/2021, 4:57 PM
That’s what I figured. I’ll take a look. Thanks for these resources 🙂
k
Kevin Kho
08/12/2021, 4:58 PM
I have a snippet for a FileHandler is it helps here
Bring your towel and join one of the fastest growing data communities. Welcome to our second-generation open source orchestration platform, a completely rethought approach to dataflow automation.