Skip to content

Commit

Permalink
glog
Browse files Browse the repository at this point in the history
  • Loading branch information
snail007 committed Jan 15, 2024
1 parent a7439e0 commit 3690714
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion module/log/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,12 @@ func (s *Logger) levelWrite(str string, level gcore.LogLevel) {
w0 := w
g.Add(1)
pool.Submit(func() {
defer g.Done()
defer func() {
if e := recover(); e != nil {
fmt.Println(fmt.Sprintf("[ERROR] gmclog writer write error: %s", e))
}
g.Done()
}()
s.write(str, w0, level)
})
}
Expand Down

0 comments on commit 3690714

Please sign in to comment.