Skip to content

Commit 9c18491

Browse files
committed
improve warning when incorrect markup setting
1 parent 83f9a3a commit 9c18491

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

modules/setting/setting.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1089,28 +1089,28 @@ func NewContext() {
10891089
for _, sec := range Cfg.Section("markup").ChildSections() {
10901090
name := strings.TrimLeft(sec.Name(), "markup.")
10911091
if name == "" {
1092-
log.Warn(sec.Name() + " name is empty, ignored")
1092+
log.Warn("name is empty, markup " + sec.Name() + "ignored")
10931093
continue
10941094
}
10951095

10961096
extensions := sec.Key("FILE_EXTENSIONS").Strings(",")
10971097
var exts = make([]string, 0, len(extensions))
10981098
for _, extension := range extensions {
10991099
if !extensionReg.MatchString(extension) {
1100-
log.Warn(sec.Name() + " FILE_EXTENSIONS " + extension + " is invalid, ignored")
1100+
log.Warn(sec.Name() + " file extension " + extension + " is invalid. Extension ignored")
11011101
} else {
11021102
exts = append(exts, extension)
11031103
}
11041104
}
11051105

11061106
if len(exts) == 0 {
1107-
log.Warn(sec.Name() + " FILE_EXTENSIONS is empty, ignored")
1107+
log.Warn(sec.Name() + " file extension is empty, markup " + name + " ignored")
11081108
continue
11091109
}
11101110

11111111
command := sec.Key("RENDER_COMMAND").MustString("")
11121112
if command == "" {
1113-
log.Warn(sec.Name() + " RENDER_COMMAND is empty, ignored")
1113+
log.Warn(" RENDER_COMMAND is empty, markup " + name + " ignored")
11141114
continue
11151115
}
11161116

0 commit comments

Comments
 (0)