mirror of
https://github.com/zeromicro/go-zero.git
synced 2025-01-24 09:40:24 +08:00
24 lines
421 B
Go
24 lines
421 B
Go
|
package logx
|
||
|
|
||
|
type LessLogger struct {
|
||
|
*limitedExecutor
|
||
|
}
|
||
|
|
||
|
func NewLessLogger(milliseconds int) *LessLogger {
|
||
|
return &LessLogger{
|
||
|
limitedExecutor: newLimitedExecutor(milliseconds),
|
||
|
}
|
||
|
}
|
||
|
|
||
|
func (logger *LessLogger) Error(v ...interface{}) {
|
||
|
logger.logOrDiscard(func() {
|
||
|
Error(v...)
|
||
|
})
|
||
|
}
|
||
|
|
||
|
func (logger *LessLogger) Errorf(format string, v ...interface{}) {
|
||
|
logger.logOrDiscard(func() {
|
||
|
Errorf(format, v...)
|
||
|
})
|
||
|
}
|