mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2025-07-04 17:06:49 +00:00
New lint rules
This commit is contained in:
@ -71,17 +71,17 @@ func GetLogLevel() Level {
|
||||
}
|
||||
|
||||
// Debug logs if the log level is set to DebugLevel or below. Arguments are handled in the manner of fmt.Printf.
|
||||
func Debug(format string, args ...interface{}) {
|
||||
func Debug(format string, args ...any) {
|
||||
logger.Debug(format, args...)
|
||||
}
|
||||
|
||||
// Info logs if the log level is set to InfoLevel or below. Arguments are handled in the manner of fmt.Printf.
|
||||
func Info(format string, args ...interface{}) {
|
||||
func Info(format string, args ...any) {
|
||||
logger.Info(format, args...)
|
||||
}
|
||||
|
||||
// Warn logs if the log level is set to WarnLevel or below. Arguments are handled in the manner of fmt.Printf.
|
||||
func Warn(format string, args ...interface{}) {
|
||||
func Warn(format string, args ...any) {
|
||||
logger.Warn(format, args...)
|
||||
}
|
||||
|
||||
@ -134,7 +134,7 @@ var logLevels = map[Level]string{
|
||||
ErrorLevel: "ERROR",
|
||||
}
|
||||
|
||||
func (l *Logger) logLevel(logLevel Level, format string, args ...interface{}) {
|
||||
func (l *Logger) logLevel(logLevel Level, format string, args ...any) {
|
||||
if logLevel < l.LogThreshold {
|
||||
return
|
||||
}
|
||||
@ -146,7 +146,7 @@ func (l *Logger) logLevel(logLevel Level, format string, args ...interface{}) {
|
||||
if len(args) > 1 {
|
||||
args = args[1:]
|
||||
} else {
|
||||
args = []interface{}{}
|
||||
args = []any{}
|
||||
}
|
||||
}
|
||||
|
||||
@ -202,17 +202,17 @@ func (l *Logger) GetLogLevel() Level {
|
||||
}
|
||||
|
||||
// Debug logs if the log level is set to DebugLevel or below. Arguments are handled in the manner of fmt.Printf.
|
||||
func (l *Logger) Debug(format string, args ...interface{}) {
|
||||
func (l *Logger) Debug(format string, args ...any) {
|
||||
l.logLevel(DebugLevel, format, args...)
|
||||
}
|
||||
|
||||
// Info logs if the log level is set to InfoLevel or below. Arguments are handled in the manner of fmt.Printf.
|
||||
func (l *Logger) Info(format string, args ...interface{}) {
|
||||
func (l *Logger) Info(format string, args ...any) {
|
||||
l.logLevel(InfoLevel, format, args...)
|
||||
}
|
||||
|
||||
// Warn logs if the log level is set to WarnLevel or below. Arguments are handled in the manner of fmt.Printf.
|
||||
func (l *Logger) Warn(format string, args ...interface{}) {
|
||||
func (l *Logger) Warn(format string, args ...any) {
|
||||
l.logLevel(WarnLevel, format, args...)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user