Skip to content

Commit

Permalink
Sync 不返回异常
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronwong1989 committed Jul 22, 2022
1 parent c6622e8 commit c068174
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,8 @@

# Golang
.idea
logs

# macos
.DS_Store

logs
5 changes: 2 additions & 3 deletions log.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,11 +170,10 @@ func BasePath() (path string) {
return
}

func Sync() error {
func Sync() {
if std != nil {
return std.Sync()
_ = std.Sync()
}
return nil
}

func Default() *zap.Logger {
Expand Down

0 comments on commit c068174

Please sign in to comment.