charmbracelet/log

Data race in Default and SetDefault

op opened this issue · 0 comments

op commented

Describe the bug

There is no synchronisation primitive around the defaultLogger, thus there's a data race when SetDefault and Default is used by multiple goroutines.

To Reproduce

Steps to reproduce the behavior:

  1. git checkout f9925aa2 (available in https://github.com/op/charmbracelet-log)
  2. go test -race ./
  3. See error