예제 #1
0
func (f *BlaFormatter) level(level log.Level) string {
	levelText := strings.ToUpper(level.String())
	switch level {
	case log.InfoLevel:
	case log.WarnLevel:
		levelText = levelText[0:4]
	default:
		levelText = levelText[0:5]
	}
	return levelText
}
예제 #2
0
func getLevel(lvl logrus.Level) string {
	switch lvl {
	case logrus.DebugLevel:
		return "DEBUG"
	case logrus.InfoLevel:
		return "INFO"
	case logrus.WarnLevel:
		return "WARN"
	case logrus.ErrorLevel, logrus.FatalLevel:
		return "ERROR"
	default:
		return lvl.String()
	}
}
예제 #3
0
파일: rexray.go 프로젝트: akutz/rexray
func setLogLevels(lvl log.Level) {
	os.Setenv("REXRAY_LOGLEVEL", lvl.String())
	os.Setenv("LIBSTORAGE_LOGGING_LEVEL", lvl.String())
}
예제 #4
0
func (c *Client) UpdateLogSeverity(s log.Level) error {
	return c.PutForm(c.endpoint("log", "severity"), url.Values{"severity": {s.String()}})
}