syslog
syslog copied to clipboard
Adding the logging to be done in a different goroutine
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.
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.