-
Notifications
You must be signed in to change notification settings - Fork 51
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
Fix logs printing in multiple threads #243
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.
Looks great! Thanks!
Problem: Function to print text with newline which is in use in library performs it as two separate actions - first is to print message and second - to print newline symbol. This way there is issues with computations in multiple threads, so newline symbol sometimes printed in wrong place. Solution: Redefine logger action to use version where newline symbol appended before printing.
@vrom911 pipeline failed, sorry - created this PR via browser and forgot to import Also, there can be same issue with other actions (like |
@vrom911 seems like you need merge it by yourself:
|
Maybe something that also should also be reported upstream (https://github.com/haskell/text/issues)? I'm not sure about the promises that text makes about concurrency - and for sure this might also depend on the used BufferMode, however it is astonishing to have a difference between |
@vrom911 - Seems like you are the only person that is allowed to merge these changes. |
Thanks a lot, merged! ❤️ |
Problem:
Function to print text with newline which is in use in library performs
it as two separate actions - first is to print message and second - to
print newline symbol.
This way there is issues with computations in multiple threads, so
newline symbol sometimes printed in wrong place.
Solution:
Redefine logger action to use version where newline symbol appended
before printing.