-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Dev Message after log quiescence #9702
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems good.
I'm uncomfortable-ish with changing the type of Logger from an interface to an implementation type. I could suggest ways of working around it, but they would all be sort of weird and artificial.
The other concern I had was whether all the UI output would be interrupted by a log message, which would almost be worse than having it at the top. I don't see any way to tell go-hclog to stop. You might be able to hold things up in quiescenceSink.Accept during the interval where you're printing the message, but that doesn't seem worth it (or necessarily robust, I don't think the delivery order is predictable.)
Yeah, didn't love that either, but since that field is only ever an InterceptorLogger it seemed safe and that we could engineer around if we needed to go back to generic Logger.
This I'm sort of okay with. The user experience is still way better than it was where the dev message is buried two pages back. A spurious, differently colored log line interspersed doesn't feel like the end of the world, and would be rare anyway. |
Register a log sink that delays the printing of the big dev warning until logs have settled
down.