Create only one log roller per file across whole process (fixes #1363) #1404

Merged
merged 1 commit into from Feb 7, 2017

Projects

None yet

2 participants

@mholt
Owner
mholt commented Feb 6, 2017 edited

Fixes #1363.

@mholt Create only one log roller per file across whole process (fixes #1363)
04da9c7
@mholt mholt requested a review from tw4452852 Feb 6, 2017
@@ -19,14 +20,30 @@ type LogRoller struct {
}
// GetLogWriter returns an io.Writer that writes to a rolling logger.
+// This should be called only from the main goroutine (like during
@tw4452852
tw4452852 Feb 7, 2017 Collaborator

How about just making it thread-safe?

@mholt
mholt Feb 7, 2017 Owner

I guess I could, I just didn't bother to since this is only called during the setup which happens in the main goroutine. Maybe if the need arises we can make it thread-safe?

@tw4452852
tw4452852 Feb 7, 2017 Collaborator

Make sense.

@mholt mholt merged commit d8f92ba into master Feb 7, 2017

5 checks passed

continuous-integration/appveyor/branch AppVeyor build succeeded
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
licence/cla Contributor License Agreement is signed.
Details
@mholt mholt deleted the combinedrollers branch Feb 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment