Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for SlowThreshold (0.06 sec)

  1. logger/slog.go

    	LogLevel                  LogLevel
    	SlowThreshold             time.Duration
    	Parameterized             bool
    	Colorful                  bool // Ignored in slog
    	IgnoreRecordNotFoundError bool
    }
    
    func NewSlogLogger(logger *slog.Logger, config Config) Interface {
    	return &slogLogger{
    		Logger:                    logger,
    		LogLevel:                  config.LogLevel,
    		SlowThreshold:             config.SlowThreshold,
    Registered: Sun Sep 07 09:35:13 UTC 2025
    - Last Modified: Mon Jul 28 09:34:58 UTC 2025
    - 2.3K bytes
    - Viewed (0)
  2. logger/logger.go

    		} else {
    			l.Printf(l.traceErrStr, utils.FileWithLineNum(), err, float64(elapsed.Nanoseconds())/1e6, rows, sql)
    		}
    	case elapsed > l.SlowThreshold && l.SlowThreshold != 0 && l.LogLevel >= Warn:
    		sql, rows := fc()
    		slowLog := fmt.Sprintf("SLOW SQL >= %v", l.SlowThreshold)
    		if rows == -1 {
    			l.Printf(l.traceWarnStr, utils.FileWithLineNum(), slowLog, float64(elapsed.Nanoseconds())/1e6, "-", sql)
    		} else {
    Registered: Sun Sep 07 09:35:13 UTC 2025
    - Last Modified: Sun Jan 12 10:19:28 UTC 2025
    - 6.3K bytes
    - Viewed (0)
Back to top