Commit b2a33408 authored by Steve Azzopardi's avatar Steve Azzopardi 💬

Merge branch 'update-log-fields' into 'master'

Update some logrus fields used in Runner logs

See merge request gitlab-org/gitlab-runner!1405
parents 98165d07 d962908e
Pipeline #64956882 passed with stages
in 68 minutes and 44 seconds
...@@ -89,7 +89,7 @@ func (m *machineProvider) create(config *common.RunnerConfig, state machineState ...@@ -89,7 +89,7 @@ func (m *machineProvider) create(config *common.RunnerConfig, state machineState
details.State = state details.State = state
details.Used = time.Now() details.Used = time.Now()
creationTime := time.Since(started) creationTime := time.Since(started)
logrus.WithField("time", creationTime). logrus.WithField("duration", creationTime).
WithField("name", details.Name). WithField("name", details.Name).
WithField("now", time.Now()). WithField("now", time.Now()).
WithField("retries", details.RetryCount). WithField("retries", details.RetryCount).
...@@ -277,7 +277,7 @@ func (n *GitLabClient) RequestJob(config common.RunnerConfig, sessionInfo *commo ...@@ -277,7 +277,7 @@ func (n *GitLabClient) RequestJob(config common.RunnerConfig, sessionInfo *commo
switch result { switch result {
case http.StatusCreated: case http.StatusCreated:
config.Log().WithFields(logrus.Fields{ config.Log().WithFields(logrus.Fields{
"job": strconv.Itoa(response.ID), "job": response.ID,
"repo_url": response.RepoCleanURL(), "repo_url": response.RepoCleanURL(),
}).Println("Checking for jobs...", "received") }).Println("Checking for jobs...", "received")
addTLSData(&response, tlsData) addTLSData(&response, tlsData)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment