From 01d5c635d4ce98b25612e89739ef83c721aab017 Mon Sep 17 00:00:00 2001 From: Boming Zhang <bomingzh@sjtu.edu.cn> Date: Fri, 15 Nov 2024 20:10:37 -0500 Subject: [PATCH] fix(cmd/joj3): setup conf name attr --- cmd/joj3/main.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmd/joj3/main.go b/cmd/joj3/main.go index d317a86..30bea6a 100644 --- a/cmd/joj3/main.go +++ b/cmd/joj3/main.go @@ -7,6 +7,7 @@ import ( "os" "github.com/joint-online-judge/JOJ3/cmd/joj3/conf" + "github.com/joint-online-judge/JOJ3/cmd/joj3/env" "github.com/joint-online-judge/JOJ3/cmd/joj3/stage" "github.com/joint-online-judge/JOJ3/cmd/joj3/teapot" internalStage "github.com/joint-online-judge/JOJ3/internal/stage" @@ -86,6 +87,7 @@ func mainImpl() (err error) { return err } slog.Debug("conf loaded", "conf", confObj) + env.Attr.ConfName = confObj.Name if err := setupSlog(confObj.LogPath); err != nil { // after conf is loaded slog.Error("setup slog", "error", err) return err