syncthing/vendor/github.com/gernest/wow/symbols.go

42 lines
537 B
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package wow
import "runtime"
// LogSymbol is a log severity level
type LogSymbol uint
// common log symbos
const (
INFO LogSymbol = iota
SUCCESS
WARNING
ERROR
)
func (s LogSymbol) String() string {
if runtime.GOOS != "windows" {
switch s {
case INFO:
return ""
case SUCCESS:
return "✔"
case WARNING:
return "⚠"
case ERROR:
return "✖"
}
} else {
switch s {
case INFO:
return "i"
case SUCCESS:
return "v"
case WARNING:
return "!!"
case ERROR:
return "x"
}
}
return ""
}