gommon icon indicating copy to clipboard operation
gommon copied to clipboard

Remove un-necessary locking (#1)

Open jhlange opened this issue 6 years ago • 2 comments

Remove un-necessary locking in the logging API.

jhlange avatar May 11 '19 02:05 jhlange

Codecov Report

Merging #29 into master will not change coverage. The diff coverage is 73.33%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #29   +/-   ##
=======================================
  Coverage   58.88%   58.88%           
=======================================
  Files           6        6           
  Lines         518      518           
=======================================
  Hits          305      305           
  Misses        210      210           
  Partials        3        3
Impacted Files Coverage Δ
log/log.go 50% <73.33%> (ø) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 82ef680...5c6c1c9. Read the comment docs.

codecov-io avatar May 11 '19 02:05 codecov-io

@jhlange Do we event need a lock for the entire block? I just looked at the code and to me it is only necessary while dumping the buffer to writer. Let me know your thoughts?

Here is a fix: https://github.com/labstack/gommon/commit/44f253335a453f4a087da4574d78ebddbe48634d

vishr avatar Jun 04 '19 15:06 vishr