Skip to content

Commit 86c787e

Browse files
committed
[core] Print debug message to IL on Bookkeeping client calls
1 parent f7c8006 commit 86c787e

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

core/bookkeeping/api.go

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ import (
3737
"github.com/spf13/viper"
3838
)
3939

40-
var log = logger.New(logrus.StandardLogger(), "Bookkeeping")
40+
var log = logger.New(logrus.StandardLogger(), "bookkeeping")
4141

4242
// [O2-2512]: Until JWT becomes optional or provided by BK
4343
// const jwtToken = "token"
@@ -80,6 +80,10 @@ func (bk *BookkeepingWrapper) CreateRun(activityId string, nDetectors int, nEpns
8080
}
8181

8282
clientAPI.CreateRun(activityId, int32(nDetectors), int32(nEpns), int32(nFlps), runNumber, runtypeAPI, timeO2Start, timeTrgStart, dd_flp, dcs, epn, epnTopology, sw.Detectors(detectors))
83+
log.WithField("runType", runType).
84+
WithField("partition", activityId).
85+
WithField("runNumber", runNumber).
86+
Debug("CreateRun call done")
8387
}
8488

8589
func (bk *BookkeepingWrapper) UpdateRun(runNumber int32, runResult string, timeO2End time.Time, timeTrgEnd time.Time) {
@@ -97,24 +101,33 @@ func (bk *BookkeepingWrapper) UpdateRun(runNumber int32, runResult string, timeO
97101
}
98102

99103
clientAPI.UpdateRun(runNumber, runquality, timeO2End, timeTrgEnd)
104+
log.WithField("runNumber", runNumber).
105+
Debug("UpdateRun call done")
100106
}
101107

102108
func (bk *BookkeepingWrapper) CreateLog(text string, title string, runNumbers string, parentLogId int32) {
103109
clientAPI.CreateLog(text, title, runNumbers, parentLogId)
110+
log.Debug("CreateLog call done")
104111
}
105112

106113
func (bk *BookkeepingWrapper) CreateFlp(name string, hostName string, runNumber int32) {
107114
clientAPI.CreateFlp(name, hostName, runNumber)
115+
log.WithField("runNumber", runNumber).
116+
Debug("CreateFlp call done")
108117
}
109118

110119
func (bk *BookkeepingWrapper) UpdateFlp(name string, runNumber int32, nSubtimeframes int32, nEquipmentBytes int32, nRecordingBytes int32, nFairMQBytes int32) {
111120
clientAPI.UpdateFlp(name, runNumber, nSubtimeframes, nEquipmentBytes, nRecordingBytes, nFairMQBytes)
121+
log.WithField("runNumber", runNumber).
122+
Debug("UpdateFlp call done")
112123
}
113124

114125
func (bk *BookkeepingWrapper) GetLogs() {
115126
clientAPI.GetLogs()
127+
log.Debug("GetLogs call done")
116128
}
117129

118130
func (bk *BookkeepingWrapper) GetRuns() {
119131
clientAPI.GetRuns()
132+
log.Debug("GetRuns call done")
120133
}

0 commit comments

Comments
 (0)