-
Notifications
You must be signed in to change notification settings - Fork 572
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
Is this async safe? #29
Comments
As described in
So if your writer is a file writer in |
Okay, that's what I thought but thx for the confirmation.
…-sent from my OnePlus X
On Dec 20, 2017 2:59 AM, "Olivier Poitrey" ***@***.***> wrote:
As described in Logger doc:
A Logger represents an active logging object that generates lines of JSON
output to an io.Writer. Each logging operation makes a single call to the
Writer's Write method. There is no guaranty on access serialization to the
Writer. If your Writer is not thread safe, you may consider a sync wrapper.
So if your writer is a file writer in O_APPEND mode, on most OS it's
gonna be thread safe as write syscall is atomic in this case. This
applies to stdout/err if redirected into a file.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#29 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AIIciP4kyxouFOSpTCbsbWylI_boQpFxks5tCL52gaJpZM4RHcct>
.
|
I am working on a project involving many concurrent services that all require some manner of logging on their own. So far I have been using Zerolog since I love the API it provides and the performance seems to be very good. I have however been noticing that oftentimes I will not see logs from goroutines etc. Is this package safe for concurrent use? Right now I use a single logger instance with is passed to other services using
logger.With().Str("service", "example").Logger()
and a pointer...The text was updated successfully, but these errors were encountered: