diff --git a/cmd/joj3/conf.go b/cmd/joj3/conf.go index d546c0c..8050a90 100644 --- a/cmd/joj3/conf.go +++ b/cmd/joj3/conf.go @@ -122,13 +122,16 @@ func parseConfFile(path string) (conf Conf, err error) { } func msgToConf(metaConfPath string, msg string) (conf Conf, err error) { + slog.Info("msg to conf", "msg", msg) metaConf, err := parseMetaConfFile(metaConfPath) if err != nil { return } for _, pattern := range metaConf.Patterns { if matched, _ := regexp.MatchString(pattern.Regex, msg); matched { - slog.Debug("pattern matched", "pattern", pattern) + slog.Debug("pattern matched", + "pattern", pattern, "filename", pattern.Filename) + slog.Info("pattern matched", "filename", pattern.Filename) return parseConfFile(pattern.Filename) } } diff --git a/internal/parsers/keyword/parser.go b/internal/parsers/keyword/parser.go index 9671a78..f7890fe 100644 --- a/internal/parsers/keyword/parser.go +++ b/internal/parsers/keyword/parser.go @@ -2,7 +2,6 @@ package keyword import ( "fmt" - "log/slog" "strings" "focs.ji.sjtu.edu.cn/git/FOCS-dev/JOJ3/internal/stage" @@ -31,7 +30,6 @@ func Parse(executorResult stage.ExecutorResult, conf Conf) ( matched := false for _, file := range conf.Files { content := executorResult.Files[file] - slog.Debug("file content", "file", file, "content", content) for _, match := range conf.Matches { count := strings.Count(content, match.Keyword) if count > 0 { diff --git a/internal/stage/run.go b/internal/stage/run.go index 6558753..c2a6d4d 100644 --- a/internal/stage/run.go +++ b/internal/stage/run.go @@ -10,7 +10,8 @@ func Run(stages []Stage) (stageResults []StageResult, err error) { var parserResults []ParserResult var forceQuit bool for _, stage := range stages { - slog.Debug("stage start", "name", stage.Name) + slog.Info("stage start", "name", stage.Name) + slog.Info("executor run start") slog.Debug("executor run start", "cmds", stage.ExecutorCmds) executor, ok := executorMap[stage.ExecutorName] if !ok { @@ -24,6 +25,7 @@ func Run(stages []Stage) (stageResults []StageResult, err error) { return } slog.Debug("executor run done", "results", executorResults) + slog.Info("parser run start") slog.Debug("parser run start", "conf", stage.ParserConf) parser, ok := parserMap[stage.ParserName] if !ok {