Skip to content
This repository has been archived by the owner on May 8, 2024. It is now read-only.

Commit

Permalink
fix: fix the code
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkgos committed Apr 17, 2024
1 parent 5bdb2fb commit eaa0d36
Show file tree
Hide file tree
Showing 6 changed files with 489 additions and 483 deletions.
180 changes: 180 additions & 0 deletions defalt.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,3 +100,183 @@ func Named(name string) *Log { return defaultLogger.Named(name) }

// Sync flushes any buffered log entries.
func Sync() error { return defaultLogger.Sync() }

//****** named after the log level or ending in "Context" for log.Print-style logging

Check failure on line 104 in defalt.go

View workflow job for this annotation

GitHub Actions / Golangci-Lint

commentFormatting: put a space between `//` and comment text (gocritic)

func Debug(args ...any) {
defaultLogger.Debug(args...)
}
func DebugContext(ctx context.Context, args ...any) {
defaultLogger.DebugContext(ctx, args...)
}
func Info(args ...any) {
defaultLogger.Info(args...)
}
func InfoContext(ctx context.Context, args ...any) {
defaultLogger.InfoContext(ctx, args...)
}
func Warn(args ...any) {
defaultLogger.Warn(args...)
}
func WarnContext(ctx context.Context, args ...any) {
defaultLogger.WarnContext(ctx, args...)
}
func Error(args ...any) {
defaultLogger.Error(args...)
}
func ErrorContext(ctx context.Context, args ...any) {
defaultLogger.ErrorContext(ctx, args...)
}
func DPanic(args ...any) {
defaultLogger.DPanic(args...)
}
func DPanicContext(ctx context.Context, args ...any) {
defaultLogger.DPanicContext(ctx, args...)
}
func Panic(args ...any) {
defaultLogger.Panic(args...)
}
func PanicContext(ctx context.Context, args ...any) {
defaultLogger.PanicContext(ctx, args...)
}
func Fatal(args ...any) {
defaultLogger.Fatal(args...)
}
func FatalContext(ctx context.Context, args ...any) {
defaultLogger.FatalContext(ctx, args...)
}

//****** ending in "f" or "fContext" for log.Printf-style logging

Check failure on line 149 in defalt.go

View workflow job for this annotation

GitHub Actions / Golangci-Lint

commentFormatting: put a space between `//` and comment text (gocritic)

func Debugf(template string, args ...any) {
defaultLogger.Debugf(template, args...)
}
func DebugfContext(ctx context.Context, template string, args ...any) {
defaultLogger.DebugfContext(ctx, template, args...)
}
func Infof(template string, args ...any) {
defaultLogger.Infof(template, args...)
}
func InfofContext(ctx context.Context, template string, args ...any) {
defaultLogger.InfofContext(ctx, template, args...)
}
func Warnf(template string, args ...any) {
defaultLogger.Warnf(template, args...)
}
func WarnfContext(ctx context.Context, template string, args ...any) {
defaultLogger.WarnfContext(ctx, template, args...)
}
func Errorf(template string, args ...any) {
defaultLogger.Errorf(template, args...)
}
func ErrorfContext(ctx context.Context, template string, args ...any) {
defaultLogger.ErrorfContext(ctx, template, args...)
}
func DPanicf(template string, args ...any) {
defaultLogger.DPanicf(template, args...)
}
func DPanicfContext(ctx context.Context, template string, args ...any) {
defaultLogger.DPanicfContext(ctx, template, args...)
}
func Panicf(template string, args ...any) {
defaultLogger.Panicf(template, args...)
}
func PanicfContext(ctx context.Context, template string, args ...any) {
defaultLogger.PanicfContext(ctx, template, args...)
}
func Fatalf(template string, args ...any) {
defaultLogger.Fatalf(template, args...)
}
func FatalfContext(ctx context.Context, template string, args ...any) {
defaultLogger.FatalfContext(ctx, template, args...)
}

//****** ending in "w" or "wContext" for loosely-typed structured logging

Check failure on line 194 in defalt.go

View workflow job for this annotation

GitHub Actions / Golangci-Lint

commentFormatting: put a space between `//` and comment text (gocritic)

func Debugw(msg string, keysAndValues ...any) {
defaultLogger.Debugw(msg, keysAndValues...)
}
func DebugwContext(ctx context.Context, msg string, keysAndValues ...any) {
defaultLogger.DebugwContext(ctx, msg, keysAndValues...)
}
func Infow(msg string, keysAndValues ...any) {
defaultLogger.Infow(msg, keysAndValues...)
}
func InfowContext(ctx context.Context, msg string, keysAndValues ...any) {
defaultLogger.InfowContext(ctx, msg, keysAndValues...)
}
func Warnw(msg string, keysAndValues ...any) {
defaultLogger.Warnw(msg, keysAndValues...)
}
func WarnwContext(ctx context.Context, msg string, keysAndValues ...any) {
defaultLogger.WarnwContext(ctx, msg, keysAndValues...)
}
func Errorw(msg string, keysAndValues ...any) {
defaultLogger.Errorw(msg, keysAndValues...)
}
func ErrorwContext(ctx context.Context, msg string, keysAndValues ...any) {
defaultLogger.ErrorwContext(ctx, msg, keysAndValues...)
}
func DPanicw(msg string, keysAndValues ...any) {
defaultLogger.DPanicw(msg, keysAndValues...)
}
func DPanicwContext(ctx context.Context, msg string, keysAndValues ...any) {
defaultLogger.DPanicwContext(ctx, msg, keysAndValues...)
}
func Panicw(msg string, keysAndValues ...any) {
defaultLogger.Panicw(msg, keysAndValues...)
}
func PanicwContext(ctx context.Context, msg string, keysAndValues ...any) {
defaultLogger.PanicwContext(ctx, msg, keysAndValues...)
}
func Fatalw(msg string, keysAndValues ...any) {
defaultLogger.Fatalw(msg, keysAndValues...)
}
func FatalwContext(ctx context.Context, msg string, keysAndValues ...any) {
defaultLogger.FatalwContext(ctx, msg, keysAndValues...)
}

//****** ending in "x" or "xContext" for structured logging

func Debugx(msg string, fields ...Field) {
defaultLogger.Debugx(msg, fields...)
}
func DebugxContext(ctx context.Context, msg string, fields ...Field) {
defaultLogger.DebugxContext(ctx, msg, fields...)
}
func Infox(msg string, fields ...Field) {
defaultLogger.Infox(msg, fields...)
}
func InfoxContext(ctx context.Context, msg string, fields ...Field) {
defaultLogger.InfoxContext(ctx, msg, fields...)
}
func Warnx(msg string, fields ...Field) {
defaultLogger.Warnx(msg, fields...)
}
func WarnxContext(ctx context.Context, msg string, fields ...Field) {
defaultLogger.WarnxContext(ctx, msg, fields...)
}
func Errorx(msg string, fields ...Field) {
defaultLogger.Errorx(msg, fields...)
}
func ErrorxContext(ctx context.Context, msg string, fields ...Field) {
defaultLogger.ErrorxContext(ctx, msg, fields...)
}
func DPanicx(msg string, fields ...Field) {
defaultLogger.DPanicx(msg, fields...)
}
func DPanicxContext(ctx context.Context, msg string, fields ...Field) {
defaultLogger.DPanicxContext(ctx, msg, fields...)
}
func Panicx(msg string, fields ...Field) {
defaultLogger.Panicx(msg, fields...)
}
func PanicxContext(ctx context.Context, msg string, fields ...Field) {
defaultLogger.PanicxContext(ctx, msg, fields...)
}
func Fatalx(msg string, fields ...Field) {
defaultLogger.Fatalx(msg, fields...)
}
func FatalxContext(ctx context.Context, msg string, fields ...Field) {
defaultLogger.FatalxContext(ctx, msg, fields...)
}
46 changes: 0 additions & 46 deletions default_logger.go

This file was deleted.

130 changes: 0 additions & 130 deletions default_sugar.go

This file was deleted.

Loading

0 comments on commit eaa0d36

Please sign in to comment.