added extra OUTPUT level
Signed-off-by: Christian Goll <cgoll@suse.com>
This commit is contained in:
committed by
Jonathon Anderson
parent
aaadf26b90
commit
5efaf6d9f5
@@ -125,7 +125,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
- Support importing containers with symlinked `/bin/sh` #797
|
- Support importing containers with symlinked `/bin/sh` #797
|
||||||
- Don't panic on malformed passwd #527
|
- Don't panic on malformed passwd #527
|
||||||
- Update iPXE building script
|
- Update iPXE building script
|
||||||
- wwlog.Info|Recv|Send will go to stdout, rest to stderr
|
- Send Info, Recv, Send, and Out messages to stdout; and others to stderr
|
||||||
|
|
||||||
## [4.4.0] 2023-01-18
|
## [4.4.0] 2023-01-18
|
||||||
|
|
||||||
|
|||||||
@@ -36,9 +36,11 @@ var (
|
|||||||
ERROR = SetLevelName(40, "ERROR")
|
ERROR = SetLevelName(40, "ERROR")
|
||||||
SECWARN = SetLevelName(31, "SECWARN")
|
SECWARN = SetLevelName(31, "SECWARN")
|
||||||
WARN = SetLevelName(30, "WARN")
|
WARN = SetLevelName(30, "WARN")
|
||||||
|
ERROUT = SetLevelName(29, "ERROUT")
|
||||||
SEND = SetLevelName(27, "SEND")
|
SEND = SetLevelName(27, "SEND")
|
||||||
RECV = SetLevelName(26, "RECV")
|
RECV = SetLevelName(26, "RECV")
|
||||||
SERV = SetLevelName(25, "SERV")
|
SERV = SetLevelName(25, "SERV")
|
||||||
|
OUT = SetLevelName(22, "OUT")
|
||||||
SECINFO = SetLevelName(21, "SECINFO")
|
SECINFO = SetLevelName(21, "SECINFO")
|
||||||
INFO = SetLevelName(20, "INFO")
|
INFO = SetLevelName(20, "INFO")
|
||||||
SECVERBOSE = SetLevelName(16, "SECVERBOSE")
|
SECVERBOSE = SetLevelName(16, "SECVERBOSE")
|
||||||
@@ -216,7 +218,7 @@ func LogCaller(level int, skip int, err error, message string, a ...interface{})
|
|||||||
}
|
}
|
||||||
|
|
||||||
message = logFormatter(logLevel, &rec)
|
message = logFormatter(logLevel, &rec)
|
||||||
if level == INFO || level == RECV || level == SEND {
|
if level == INFO || level == RECV || level == SEND || level == OUT {
|
||||||
fmt.Fprint(logOut, message)
|
fmt.Fprint(logOut, message)
|
||||||
} else {
|
} else {
|
||||||
fmt.Fprint(logErr, message)
|
fmt.Fprint(logErr, message)
|
||||||
@@ -273,6 +275,10 @@ func Info(message string, a ...interface{}) {
|
|||||||
LogCaller(INFO, 1, nil, message, a...)
|
LogCaller(INFO, 1, nil, message, a...)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func Output(message string, a ...interface{}) {
|
||||||
|
LogCaller(OUT, 1, nil, message, a...)
|
||||||
|
}
|
||||||
|
|
||||||
func InfoExc(err error, message string, a ...interface{}) {
|
func InfoExc(err error, message string, a ...interface{}) {
|
||||||
LogCaller(INFO, 1, err, message, a...)
|
LogCaller(INFO, 1, err, message, a...)
|
||||||
}
|
}
|
||||||
@@ -305,6 +311,10 @@ func SecWarn(message string, a ...interface{}) {
|
|||||||
LogCaller(SECWARN, 1, nil, message, a...)
|
LogCaller(SECWARN, 1, nil, message, a...)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func ErrOut(message string, a ...interface{}) {
|
||||||
|
LogCaller(ERROUT, 1, nil, message, a...)
|
||||||
|
}
|
||||||
|
|
||||||
func Error(message string, a ...interface{}) {
|
func Error(message string, a ...interface{}) {
|
||||||
LogCaller(ERROR, 1, nil, message, a...)
|
LogCaller(ERROR, 1, nil, message, a...)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user