logger fixes (#1244)

* logger: fix race conditions

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>

* restore util/log for compatibility

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
2020-02-24 16:07:40 +03:00
committed by GitHub
parent 1f767ba18c
commit cf0b39eaac
3 changed files with 275 additions and 8 deletions

17
util/log/README.md Normal file
View File

@@ -0,0 +1,17 @@
# Log
DEPRECATED: use github.com/micro/go-micro/v2/logger interface
This is the global logger for all micro based libraries.
## Set Logger
Set the logger for micro libraries
```go
// import go-micro/util/log
import "github.com/micro/go-micro/util/log"
// SetLogger expects github.com/micro/go-micro/debug/log.Log interface
log.SetLogger(mylogger)
```