added warning color

This commit is contained in:
2024-04-14 16:25:24 +02:00
parent d308a2cfc8
commit 89da5678dc
3 changed files with 6 additions and 4 deletions

View File

@@ -64,11 +64,12 @@ func webhook(p []byte) {
json.Unmarshal(p, &logJson)
var color string = "36314"
formTitles := map[string]string{
"error": "16739179",
"debug": "16111426",
"error": "red",
"debug": "yellow",
"warning": "orange",
}
if val, ok := formTitles[logJson.Level]; ok {
color = val
color = fmt.Sprint(custom.GetColor(val))
}
fileArray := strings.Split(strings.TrimPrefix(logJson.File, RootDir()), ":")