Skip to content

Commit

Permalink
chore: update preview images, update some comments
Browse files Browse the repository at this point in the history
  • Loading branch information
inhere committed Jun 13, 2022
1 parent d79721c commit 7ec2b8c
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 9 deletions.
Binary file modified _example/images/console-log-all-level.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _example/images/slog-all-level.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 0 additions & 3 deletions _example/slog_all_level.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,8 @@ func printAllLevel(l *slog.Logger, args ...interface{}) {
l.Warn(args...)
l.Error(args...)
l.Print(args...)
l.Println(args...)
l.Fatal(args...)
l.Fatalln(args...)
l.Panic(args...)
l.Panicln(args...)

l.Trace(args...)
l.Notice(args...)
Expand Down
10 changes: 5 additions & 5 deletions common_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,11 +138,11 @@ func newTestHandler() *testHandler {
return &testHandler{}
}

func (h testHandler) Reset() {
h.errOnHandle = false
h.errOnFlush = false
h.errOnClose = false
}
// func (h testHandler) Reset() {
// h.errOnHandle = false
// h.errOnFlush = false
// h.errOnClose = false
// }

func (h testHandler) IsHandling(level slog.Level) bool {
return true
Expand Down
2 changes: 1 addition & 1 deletion handler/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ func (c *Config) RotateWriter() (output SyncCloseWriter, err error) {
// CreateWriter build writer by config
func (c *Config) CreateWriter() (output SyncCloseWriter, err error) {
if c.Logfile == "" {
return nil, errorx.Raw("slog: logfile cannot be emtpy for create writer")
return nil, errorx.Raw("slog: logfile cannot be empty for create writer")
}

// create a rotate config.
Expand Down

0 comments on commit 7ec2b8c

Please sign in to comment.