Versions in this module Expand all Collapse all v1 v1.24.4 Nov 15, 2022 v1.24.3 Nov 15, 2022 Changes in this version + const Blue + const BlueBold + const Cyan + const Green + const Magenta + const MagentaBold + const Red + const RedBold + const Reset + const White + const Yellow + const YellowBold + var Default = New(log.New(os.Stdout, "\r\n", log.LstdFlags), Config{ ... }) + var Discard = New(log.New(io.Discard, "", log.LstdFlags), Config{}) + var ErrRecordNotFound = errors.New("record not found") + var Recorder = traceRecorder + func ExplainSQL(sql string, numericPlaceholder *regexp.Regexp, escaper string, ...) string + type Config struct + Colorful bool + IgnoreRecordNotFoundError bool + LogLevel LogLevel + SlowThreshold time.Duration + type Interface interface + Error func(context.Context, string, ...interface{}) + Info func(context.Context, string, ...interface{}) + LogMode func(LogLevel) Interface + Trace func(ctx context.Context, begin time.Time, ...) + Warn func(context.Context, string, ...interface{}) + func New(writer Writer, config Config) Interface + type LogLevel int + const Error + const Info + const Silent + const Warn + type Writer interface + Printf func(string, ...interface{})