Explorar el Código

remove log type sanitization

tags/v2.1.0-rc1
Shivaram Lingamneni hace 4 años
padre
commit
6e4b0b3125
Se han modificado 1 ficheros con 1 adiciones y 4 borrados
  1. 1
    4
      irc/logger/logger.go

+ 1
- 4
irc/logger/logger.go Ver fichero

@@ -10,8 +10,6 @@ import (
10 10
 	"os"
11 11
 	"time"
12 12
 
13
-	"strings"
14
-
15 13
 	"sync"
16 14
 	"sync/atomic"
17 15
 )
@@ -221,8 +219,7 @@ func (logger *singleLogger) Log(level Level, logType string, messageParts ...str
221 219
 	}
222 220
 
223 221
 	// ensure we're capturing this logType
224
-	logTypeCleaned := strings.ToLower(strings.TrimSpace(logType))
225
-	capturing := (logger.Types["*"] || logger.Types[logTypeCleaned]) && !logger.ExcludedTypes["*"] && !logger.ExcludedTypes[logTypeCleaned]
222
+	capturing := (logger.Types["*"] || logger.Types[logType]) && !logger.ExcludedTypes["*"] && !logger.ExcludedTypes[logType]
226 223
 	if !capturing {
227 224
 		return
228 225
 	}

Loading…
Cancelar
Guardar