MCPcopy
hub / github.com/go-sql-driver/mysql / SetLogger

Function SetLogger

errors.go:55–61  ·  view source on GitHub ↗

SetLogger is used to set the default logger for critical errors. The initial logger is os.Stderr.

(logger Logger)

Source from the content-addressed store, hash-verified

53// SetLogger is used to set the default logger for critical errors.
54// The initial logger is os.Stderr.
55func SetLogger(logger Logger) error {
56 if logger == nil {
57 return errors.New("logger is nil")
58 }
59 defaultLogger = logger
60 return nil
61}
62
63// MySQLError is an error type which represents a single MySQL error
64type MySQLError struct {

Callers 2

TestErrorsSetLoggerFunction · 0.85
TestUnixSocketAuthFailFunction · 0.85

Calls

no outgoing calls

Tested by 2

TestErrorsSetLoggerFunction · 0.68
TestUnixSocketAuthFailFunction · 0.68