Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,9 @@
if input.jsonLogger {
log.SetFormatter(&log.JSONFormatter{})
}
if log.IsLevelEnabled(log.DebugLevel) {
log.SetReportCaller(true)
}

Check warning on line 357 in cmd/root.go

View check run for this annotation

Codecov / codecov/patch

cmd/root.go#L355-L357

Added lines #L355 - L357 were not covered by tests

if ok, _ := cmd.Flags().GetBool("bug-report"); ok {
return bugReport(ctx, cmd.Version)
Expand Down
2 changes: 2 additions & 0 deletions pkg/runner/logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ func WithJobLogger(ctx context.Context, jobID string, jobName string, config *Co
logger.SetFormatter(formatter)
}

// If the main logger is reporting caller, this inner one should too
logger.SetReportCaller(logrus.StandardLogger().ReportCaller)
logger.SetFormatter(&maskedFormatter{
Formatter: logger.Formatter,
masker: valueMasker(config.InsecureSecrets, config.Secrets),
Expand Down
Loading