Skip to content

Commit 75b9dd8

Browse files
committed
Disable logs discovery when appLog is specified
1 parent 2d1a205 commit 75b9dd8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

internal/agent/ondemand/ondemand.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,20 +360,21 @@ Ignored errors: %v
360360
}
361361
threadDump = goCapture(endpoint, capture.WrapRun(capThreadDump))
362362

363+
useGlobalConfigAppLogs := false
363364
// ------------------------------------------------------------------------------
364365
// Capture legacy app log
365366
// ------------------------------------------------------------------------------
366367
var appLog chan capture.Result
367368
if len(config.GlobalConfig.AppLog) > 0 && config.GlobalConfig.AppLogLineCount != 0 {
368369
configAppLogs := config.AppLogs{config.AppLog(config.GlobalConfig.AppLog)}
369370
appLog = goCapture(endpoint, capture.WrapRun(&capture.AppLog{Paths: configAppLogs, LineLimit: config.GlobalConfig.AppLogLineCount}))
371+
useGlobalConfigAppLogs = true
370372
}
371373

372374
// ------------------------------------------------------------------------------
373375
// Capture app logs
374376
// ------------------------------------------------------------------------------
375377
var appLogs chan capture.Result
376-
useGlobalConfigAppLogs := false
377378
if len(config.GlobalConfig.AppLogs) > 0 && config.GlobalConfig.AppLogLineCount != 0 {
378379

379380
appLogsContainDollarSign := false

0 commit comments

Comments
 (0)