You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi! As far as I can understand, Conan 2.0 doesn’t flush stderr regularly when writing log messages.
When a relatively long operation without any output gets executed, you don’t see what is actually being executed, since the corresponding helpful log message is buffered and not printed yet. On multiple occasions I was trying to understand why some totally harmless operation is executing for so long, when in fact Conan was downloading & unpacking a large package in source() method at that time :) I did self.output.flush() just before calling get() in the method as a workaround, which immediately improved readability… in that specific place.
I believe it is also bad to have unflushed escape sequences. If the stream flushes the buffer only when it is full (read: whenever it wants to), it can flush the start of the colored message, but not the end of it, where the color resets back.
Do you think this can be fixed? I would love to at least have a conf for that.
Thanks!
Have you read the CONTRIBUTING guide?
I've read the CONTRIBUTING guide
The text was updated successfully, but these errors were encountered:
I think I have also seen a problem with trace logs, when python tries to print a traceback from exception at the same time when Conan shows logs saying that something has broken, which completely messes up traceback. I am not sure this is related to flushing though..
Thanks for reporting, I think it makes sense to flush automatically after every write, it seems it was done this way in 1.X. Submitting #14310 for next 2.0.9
What is your question?
Hi! As far as I can understand, Conan 2.0 doesn’t flush stderr regularly when writing log messages.
When a relatively long operation without any output gets executed, you don’t see what is actually being executed, since the corresponding helpful log message is buffered and not printed yet. On multiple occasions I was trying to understand why some totally harmless operation is executing for so long, when in fact Conan was downloading & unpacking a large package in
source()
method at that time :) I didself.output.flush()
just before callingget()
in the method as a workaround, which immediately improved readability… in that specific place.I believe it is also bad to have unflushed escape sequences. If the stream flushes the buffer only when it is full (read: whenever it wants to), it can flush the start of the colored message, but not the end of it, where the color resets back.
Do you think this can be fixed? I would love to at least have a conf for that.
Thanks!
Have you read the CONTRIBUTING guide?
The text was updated successfully, but these errors were encountered: