We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5b8e421 commit c50ef0fCopy full SHA for c50ef0f
1 file changed
cmds/admin_server/server/server.go
@@ -126,6 +126,7 @@ func (r *RouteHandler) addLogs(c *gin.Context) {
126
ctx = ctx.WithLogger(r.log)
127
err := r.storage.StoreLogs(ctx, storageLogs)
128
if err != nil {
129
+ r.log.Errorf("Err while storing logs: %v", err)
130
switch {
131
case errors.Is(err, storage.ErrInsert):
132
c.JSON(http.StatusInternalServerError, gin.H{"status": "err", "msg": "error while storing the batch"})
@@ -155,6 +156,7 @@ func (r *RouteHandler) getLogs(c *gin.Context) {
155
156
result, err := r.storage.GetLogs(ctx, query.ToStorageQuery())
157
158
c.JSON(http.StatusInternalServerError, gin.H{"status": "err", "msg": "error while getting the logs"})
159
+ r.log.Errorf("Err while getting logs from storage: %v", err)
160
return
161
}
162
0 commit comments