func (hook *TelegramHook) Levels() []logrus.Level {
	level := make(map[string]logrus.Level)
	level["panic"] = logrus.PanicLevel
	level["fatal"] = logrus.FatalLevel
	level["error"] = logrus.ErrorLevel
	level["warn"] = logrus.WarnLevel
	level["info"] = logrus.InfoLevel
	level["debug"] = logrus.DebugLevel
	level["trace"] = logrus.TraceLevel

	var logrusLevel []logrus.Level

	for k, v := range level {
		logrusLevel = append(logrusLevel, v)
		if k == logrus.GetLevel().String() {
			break
		}
	}

	return logrusLevel

	// return []logrus.Level{
	// 	logrus.TraceLevel,
	// 	logrus.DebugLevel,
	// 	logrus.InfoLevel,
	// 	logrus.WarnLevel,
	// 	logrus.ErrorLevel,
	// 	logrus.FatalLevel,
	// 	logrus.PanicLevel,
	// }
}
// Levels returns the log levels that the hook should be enabled for.
Levels returns the log levels that the hook should be enabled for.
// Levels returns the log levels that the hook should be enabled for .
func (hook *TelegramHook) Levels() []logrus.Level {
	level := make(map[string]logrus.Level)
	level["panic"] = logrus.PanicLevel
	level["fatal"] = logrus.FatalLevel
	level["error"] = logrus.ErrorLevel
	level["warn"] = logrus.WarnLevel
	level["info"] = logrus.InfoLevel
	level["debug"] = logrus.DebugLevel
	level["trace"] = logrus.TraceLevel
	var logrusLevel []logrus.Level
	for k, v := range level {
		logrusLevel = append(logrusLevel, v)
		if k == logrus.GetLevel().String() {
			break
		}
	}
	return logrusLevel
}
func ( hook * TelegramHook ) Levels ( ) [ ] logrus . Level { level := make ( map [ string ] logrus . Level ) level [ " " ] = logrus . PanicLevel level [ " " ] = logrus . FatalLevel level [ " " ] = logrus . ErrorLevel level [ " " ] = logrus . WarnLevel level [ " " ] = logrus . InfoLevel level [ " " ] = logrus . DebugLevel level [ " " ] = logrus . TraceLevel var logrusLevel [ ] logrus . Level for k , v := range level { logrusLevel = append ( logrusLevel , v ) if k == logrus . GetLevel ( ) . String ( ) { break } } return logrusLevel }
Levels returns the log levels that the hook should be enabled for.
Levels returns the log levels that the hook should be enabled for .
// return []logrus.Level{ // 	logrus.TraceLevel, // 	logrus.DebugLevel, // 	logrus.InfoLevel, // 	logrus.WarnLevel, // 	logrus.ErrorLevel, // 	logrus.FatalLevel, // 	logrus.PanicLevel, // }