Skip to content

Commit

Permalink
有几个一起打印出来, 方便阅读
Browse files Browse the repository at this point in the history
  • Loading branch information
warrially committed Aug 18, 2021
1 parent 1ec30e7 commit 5dc8155
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions zaplog/zaplog.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,32 +158,38 @@ func Errorf(template string, args ...interface{}) {

// DPanic ()
func DPanic(args ...interface{}) {
fmt.Println(args...)
theZap.DPanic(args...)
}

// DPanicf ()
func DPanicf(template string, args ...interface{}) {
theZap.DPanicf(template, args...)
fmt.Printf(template, args...)
theZap.DPanicf(`[D]`+template, args...)
}

// Panic ()
func Panic(args ...interface{}) {
fmt.Println(args...)
theZap.Panic(args...)
}

// Panicf ()
func Panicf(template string, args ...interface{}) {
theZap.Panicf(template, args...)
fmt.Printf(template, args...)
theZap.Panicf(`[P]`+template, args...)
}

// Fatal ()
func Fatal(args ...interface{}) {
fmt.Println(args...)
theZap.Fatal(args...)
}

// Fatalf ()
func Fatalf(template string, args ...interface{}) {
theZap.Fatalf(template, args...)
fmt.Printf(template, args...)
theZap.Fatalf(`[F]`+template, args...)
}

// Flush ()
Expand Down

0 comments on commit 5dc8155

Please sign in to comment.