syslog icon indicating copy to clipboard operation
syslog copied to clipboard

Adding the logging to be done in a different goroutine

Open buksy opened this issue 10 years ago • 1 comments

Hi I am very new to golang. So don't know if I have done something fundamentally wrong or utter useless change with this patch I have made the sys logging to be done in a separate go routine thus (I think) eliminating the requirement to have a mutext on the Syslog function. I /think this way of logging will be useful if you a running a REST API etc so that your app code (API request) will not wait on a mutext.

buksy avatar Sep 27 '14 21:09 buksy

It's really not an issue - mutex is only matters when simultaneously invoke syslog and openlog functions. Syslog function is guarded via read lock that should allow multiple threads call this function without locking.

blackjack avatar Oct 31 '14 11:10 blackjack