Skip to content

Commit 284b7fd

Browse files
committed
Add debug log for when logdir defaults to custom tempdir
1 parent 004248e commit 284b7fd

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

agent/agent.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,9 @@ func New(options Options) io.Closer {
8989
options.TempDir = os.TempDir()
9090
}
9191
if options.LogDir == "" {
92+
if options.TempDir != os.TempDir() {
93+
options.Logger.Debug(context.Background(), "log dir not set, using temp dir", slog.F("temp_dir", options.TempDir))
94+
}
9295
options.LogDir = options.TempDir
9396
}
9497
if options.ExchangeToken == nil {

0 commit comments

Comments
 (0)