Skip to content

Commit

Permalink
Added more trace logging (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
applejag authored and GitHub Enterprise committed Oct 4, 2022
1 parent 3aa0f7f commit 8f7c450
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,12 @@ func (r Release) JiraIssue() jira.Issue {
var extraFields tcontainer.MarshalMap

if config.ProjectNameCustomField == 0 {
log.Trace().Msg("Create ticket with project name in labels.")
labels = append(labels, r.Project)
} else {
log.Trace().
Uint("customField", config.ProjectNameCustomField).
Msg("Create ticket with project name in custom field.")
customFieldName := fmt.Sprintf("customfield_%d", config.ProjectNameCustomField)
extraFields = tcontainer.MarshalMap{
customFieldName: r.Project,
Expand Down Expand Up @@ -242,7 +246,10 @@ func configSetup() error {
return dotEnvErr
}

log.Debug().Str("url", config.JiraURL).Msg("Loaded configuration.")
log.Debug().
Str("url", config.JiraURL).
Uint("customField", config.ProjectNameCustomField).
Msg("Loaded configuration.")

var httpClient *http.Client
tlsConfig := tls.Config{InsecureSkipVerify: config.SkipCertVerify}
Expand Down

0 comments on commit 8f7c450

Please sign in to comment.