-
Notifications
You must be signed in to change notification settings - Fork 1
Switch from "printing" to "logging" #30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Should we use Python's built-in logging? we could also use some third-party logging library - not sure if you have any favorites |
Yes, we should use Python's built-in logging. I saw this video a while ago, but I am no expert and there may be a better resource. We should certainly keep it as simple as possible. |
Perhaps we should stream all logs up from the workers -> agents -> launcher |
I think I'll adapt this solution: https://docs.python.org/2.7/howto/logging-cookbook.html#sending-and-receiving-logging-events-across-a-network |
Sounds good -- just be aware those are Python 2 docs :) |
also fyi, I keep seeing that we can see about that after the current logging adjustments |
That's pretty strange. Well, yeah we'll see what it's like once we get logging working. |
@apoorvkh Should we still provide a way for worker output to be captured? Else I can just remove all the existing log stuff and we can completely depend on the logging library. |
I was thinking that all the workers (e.g. in |
That's what I'm doing. I was just curious whether you thought stdout/stderr should also be captured. idk, I guess code in libraries that people might use could output to those streams rather than log? for now I'll ignore it. |
Oh is there a difference between: Yeah, I think we should also be streaming the |
Well, the way we're streaming the logs is a little more advanced than just sending strings from the workers/agents to the launcher. We're sending
Ok! Just for single worker, perhaps? The launcher process should print this? |
Hmm, I guess I don't understand enough about how you're implementing this. I think we need to talk about it in more detail tomorrow.
I think we should be streaming all logging events, not just
No, I think we should stream everything. Later, we can include a filtering mechanism to choose what the launcher process will print. |
I guess it's good to stream "logging events", rather than exclusively just an stdout/err byte stream. Because that will offer deeply granular control for filtering outputs from the launcher. |
Also, maybe we can just redirect stdout to logging E.g. https://stackoverflow.com/questions/11124093/redirect-python-print-output-to-logger |
No description provided.
The text was updated successfully, but these errors were encountered: