fix(cmd/joj3): setup conf name attr
This commit is contained in:
parent
e808408170
commit
01d5c635d4
|
@ -7,6 +7,7 @@ import (
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
"github.com/joint-online-judge/JOJ3/cmd/joj3/conf"
|
"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/stage"
|
||||||
"github.com/joint-online-judge/JOJ3/cmd/joj3/teapot"
|
"github.com/joint-online-judge/JOJ3/cmd/joj3/teapot"
|
||||||
internalStage "github.com/joint-online-judge/JOJ3/internal/stage"
|
internalStage "github.com/joint-online-judge/JOJ3/internal/stage"
|
||||||
|
@ -86,6 +87,7 @@ func mainImpl() (err error) {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
slog.Debug("conf loaded", "conf", confObj)
|
slog.Debug("conf loaded", "conf", confObj)
|
||||||
|
env.Attr.ConfName = confObj.Name
|
||||||
if err := setupSlog(confObj.LogPath); err != nil { // after conf is loaded
|
if err := setupSlog(confObj.LogPath); err != nil { // after conf is loaded
|
||||||
slog.Error("setup slog", "error", err)
|
slog.Error("setup slog", "error", err)
|
||||||
return err
|
return err
|
||||||
|
|
Loading…
Reference in New Issue
Block a user