ciscocsirt / netsarlacc

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

All logging should be done via a single goroutine

bmenrigh opened this issue · comments

Right now any worker that produces logs calls straight into the logging routines. This opens up the possibility for race conditions, especially during log rotation. We should create a logging goroutine and pass all log contents over a channel to eliminate any chance of races.

I was going to implement this during the Worker pool #11 issue.

I think lumberjack does a good job right now of handling the syslog, so Im working on getting the connections logged in a single go routine.

This is solved in issue #8

Please squash all your commits into one and add what you've done in the PR.

You can use this link as a reference https://chris.beams.io/posts/git-commit/

The code was checked in and a race condition was fixed.