mirror of
https://github.com/m1k1o/neko.git
synced 2025-08-04 01:09:27 +02:00
ignore duplicated packet log messages.
This commit is contained in:
parent
71dbdc06f5
commit
39d48c3db8
1 changed files with 4 additions and 4 deletions
|
@ -41,18 +41,18 @@ func (l logger) Debugf(format string, args ...interface{}) {
|
|||
l.logger.Debug().Msg(strings.TrimSpace(msg))
|
||||
}
|
||||
func (l logger) Info(msg string) {
|
||||
if strings.Contains(msg, "packetio.Buffer is full") {
|
||||
//l.logger.Panic().Msg(msg)
|
||||
if strings.Contains(msg, "duplicated packet") {
|
||||
return
|
||||
}
|
||||
|
||||
l.logger.Info().Msg(strings.TrimSpace(msg))
|
||||
}
|
||||
func (l logger) Infof(format string, args ...interface{}) {
|
||||
msg := fmt.Sprintf(format, args...)
|
||||
if strings.Contains(msg, "packetio.Buffer is full") {
|
||||
// l.logger.Panic().Msg(msg)
|
||||
if strings.Contains(msg, "duplicated packet") {
|
||||
return
|
||||
}
|
||||
|
||||
l.logger.Info().Msg(strings.TrimSpace(msg))
|
||||
}
|
||||
func (l logger) Warn(msg string) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue