feat(log): tee logs to file and stdout (#42)
This commit is contained in:
parent
6bd8d2422b
commit
9b2157ac6a
6 changed files with 98 additions and 22 deletions
|
@ -82,11 +82,11 @@ func (lk *AutoLocker) Exec(handler func()) {
|
|||
|
||||
defer func() {
|
||||
if p := recover(); p != nil {
|
||||
fmt.Println(p)
|
||||
lk.h.deps.Log().Error(p)
|
||||
}
|
||||
if locked {
|
||||
if err = kv.Unlock(lk.key); err != nil {
|
||||
fmt.Println(err)
|
||||
lk.h.deps.Log().Error(err)
|
||||
}
|
||||
}
|
||||
}()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue