Skip to content

Commit

Permalink
docs: update typo
Browse files Browse the repository at this point in the history
  • Loading branch information
windvalley committed Oct 28, 2021
1 parent 348f951 commit 23d5ea0
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ func main() {
defer log.Sync()

log.Info("Hello world!")
log.Info("Hello ", String("string_key", "value"), Int("int_key", 666))
log.Info("Hello ", log.String("string_key", "value"), log.Int("int_key", 666))
log.Infof("Hello %s!", "world")
log.Infow("Hello ", "string_key", "value", "int_key", 666)

log.WithName("logger1").Warn("I am logger1")
log.WithName("logger2").Warn("I am logger2")

log.WithFields(String("f1", "value"), Int("f2", 888)).Error("Hello world!")
log.WithName("logger3").WithFields(String("f1", "value"), Int("f2", 888)).Error("Hello world!")
log.WithFields(log.String("f1", "value"), log.Int("f2", 888)).Error("Hello world!")
log.WithName("logger3").WithFields(log.String("f1", "value"), log.Int("f2", 888)).Error("Hello world!")
}
```

Expand Down Expand Up @@ -67,15 +67,15 @@ func main() {
log.Init(opts)

log.Info("Hello world!")
log.Info("Hello ", String("string_key", "value"), Int("int_key", 666))
log.Info("Hello ", log.String("string_key", "value"), log.Int("int_key", 666))
log.Infof("Hello %s!", "world")
log.Infow("Hello ", "string_key", "value", "int_key", 666)

log.WithName("logger1").Warn("I am logger1")
log.WithName("logger2").Warn("I am logger2")

log.WithFields(String("f1", "value"), Int("f2", 888)).Error("Hello world!")
log.WithName("logger3").WithFields(String("f1", "value"), Int("f2", 888)).Error("Hello world!")
log.WithFields(log.String("f1", "value"), log.Int("f2", 888)).Error("Hello world!")
log.WithName("logger3").WithFields(log.String("f1", "value"), log.Int("f2", 888)).Error("Hello world!")

// log file rotate test
for i := 0; i <= 20000; i++ {
Expand Down

0 comments on commit 23d5ea0

Please sign in to comment.