labstack / gommon

Common packages for Go
MIT License
536 stars 100 forks source link

log is not thread-safe #4

Closed AlekSi closed 8 years ago

AlekSi commented 8 years ago

Specifically, New() is not thread-safe due to use of exported color functions instead of using own Color instance. Pull request adds test to show that.

AlekSi commented 8 years ago

@vishr poke

vishr commented 8 years ago

@AlekSi: Will get back to this, really busy with echo v2 and other stuff.

AlekSi commented 8 years ago

@vishr poke

vishr commented 8 years ago

@AlekSi Thanks for the long wait. You need to re-do your PR as it has conflicts.

AlekSi commented 8 years ago

This PR merely demonstrates the problem, not fixes it. I'm not sure why you are not using Color instances.

vishr commented 8 years ago

I am open for PR ;)

AlekSi commented 8 years ago

If you don't have a specific reason to not use separate instances, then I can fix it.

vishr commented 8 years ago

We should be good with color field for logger - I can't remember why I didn't have this.

AlekSi commented 8 years ago

Closed in favor of #6