SetLogger is used to set the default logger for critical errors. The initial logger is os.Stderr.
(logger Logger)
| 53 | // SetLogger is used to set the default logger for critical errors. |
| 54 | // The initial logger is os.Stderr. |
| 55 | func 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 |
| 64 | type MySQLError struct { |
no outgoing calls