Skip to content

Commit

Permalink
Add trace logging
Browse files Browse the repository at this point in the history
  • Loading branch information
bdwyertech committed Oct 22, 2024
1 parent abc5cc6 commit 1f2aae9
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions ecr-scanner/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,13 @@ func init() {
if os.Getenv("GITLAB_CI") != "" {
color.NoColor = false
}
if v := os.Getenv("ECR_SCANNER_DEBUG"); len(v) != 0 {
log.SetLevel(log.DebugLevel)
}
if v := os.Getenv("ECR_SCANNER_TRACE"); len(v) != 0 {
log.SetLevel(log.TraceLevel)
log.SetReportCaller(true)
}
}

func main() {
Expand Down

0 comments on commit 1f2aae9

Please sign in to comment.