Пример #1
0
func (f *ErlogWriterAppender) textLevel(level logs.Level) string {
	levelText := strings.ToUpper(level.String())
	switch level {
	case logs.INFO:
	case logs.WARN:
		levelText = levelText[0:4]
	default:
		levelText = levelText[0:5]
	}
	return levelText
}
Пример #2
0
func (l *ErlogLogger) IsLevelEnabled(level logs.Level) bool { return level.IsEnableFor(l.Level) }