Error print error messages
(ctx context.Context, msg string, data ...interface{})
| 65 | |
| 66 | // Error print error messages |
| 67 | func (l *zapLogger) Error(ctx context.Context, msg string, data ...interface{}) { |
| 68 | if l.LogLevel >= glog.Error { |
| 69 | log2.Logger(ctx).Error("[SQL] "+fmt.Sprintf(msg, data...), zap.String("file", utils.FileWithLineNum()), zap.String("layer", "sql")) |
| 70 | } |
| 71 | } |
| 72 | |
| 73 | // Trace print sql message |
| 74 | func (l *zapLogger) Trace(ctx context.Context, begin time.Time, fc func() (string, int64), err error) { |