feat: log env
All checks were successful
build / build (push) Successful in 1m43s
build / trigger-build-image (push) Successful in 5s

This commit is contained in:
张泊明518370910136 2024-10-07 01:38:40 -04:00
parent c3faf8ed55
commit 33bd629b70
GPG Key ID: D47306D7062CDA9D

View File

@ -14,6 +14,10 @@ func Run(conf conf.Conf) error {
if conf.SkipTeapot { if conf.SkipTeapot {
return nil return nil
} }
for _, env := range os.Environ() {
pair := strings.SplitN(env, "=", 2)
slog.Info("env", "key", pair[0], "value", pair[1])
}
os.Setenv("LOG_FILE_PATH", "/home/tt/.cache/joint-teapot-debug.log") os.Setenv("LOG_FILE_PATH", "/home/tt/.cache/joint-teapot-debug.log")
os.Setenv("_TYPER_STANDARD_TRACEBACK", "1") os.Setenv("_TYPER_STANDARD_TRACEBACK", "1")
envFilePath := "/home/tt/.config/teapot/teapot.env" envFilePath := "/home/tt/.config/teapot/teapot.env"