@@ -32,7 +32,7 @@ func (lm *loggingMiddleware) CreateThings(ctx context.Context, token string, cli
3232 }
3333 if err != nil {
3434 args = append (args , slog .Any ("error" , err ))
35- lm .logger .Warn (fmt .Sprintf ("Create %d things failed to complete successfully" , len (clients )), args ... )
35+ lm .logger .Error (fmt .Sprintf ("Create %d things failed to complete successfully" , len (clients )), args ... )
3636 return
3737 }
3838 lm .logger .Info (fmt .Sprintf ("Create %d things completed successfully" , len (clients )), args ... )
@@ -108,7 +108,7 @@ func (lm *loggingMiddleware) UpdateClient(ctx context.Context, token string, cli
108108 }
109109 if err != nil {
110110 args = append (args , slog .Any ("error" , err ))
111- lm .logger .Warn ("Update thing failed to complete successfully" , args ... )
111+ lm .logger .Error ("Update thing failed to complete successfully" , args ... )
112112 return
113113 }
114114 lm .logger .Info ("Update thing completed successfully" , args ... )
@@ -128,7 +128,7 @@ func (lm *loggingMiddleware) UpdateClientTags(ctx context.Context, token string,
128128 }
129129 if err != nil {
130130 args := append (args , slog .String ("error" , err .Error ()))
131- lm .logger .Warn ("Update thing tags failed to complete successfully" , args ... )
131+ lm .logger .Error ("Update thing tags failed to complete successfully" , args ... )
132132 return
133133 }
134134 lm .logger .Info ("Update thing tags completed successfully" , args ... )
@@ -147,7 +147,7 @@ func (lm *loggingMiddleware) UpdateClientSecret(ctx context.Context, token, oldS
147147 }
148148 if err != nil {
149149 args = append (args , slog .Any ("error" , err ))
150- lm .logger .Warn ("Update thing secret failed to complete successfully" , args ... )
150+ lm .logger .Error ("Update thing secret failed to complete successfully" , args ... )
151151 return
152152 }
153153 lm .logger .Info ("Update thing secret completed successfully" , args ... )
@@ -166,7 +166,7 @@ func (lm *loggingMiddleware) EnableClient(ctx context.Context, token, id string)
166166 }
167167 if err != nil {
168168 args = append (args , slog .Any ("error" , err ))
169- lm .logger .Warn ("Enable thing failed to complete successfully" , args ... )
169+ lm .logger .Error ("Enable thing failed to complete successfully" , args ... )
170170 return
171171 }
172172 lm .logger .Info ("Enable thing completed successfully" , args ... )
@@ -185,7 +185,7 @@ func (lm *loggingMiddleware) DisableClient(ctx context.Context, token, id string
185185 }
186186 if err != nil {
187187 args = append (args , slog .Any ("error" , err ))
188- lm .logger .Warn ("Disable thing failed to complete successfully" , args ... )
188+ lm .logger .Error ("Disable thing failed to complete successfully" , args ... )
189189 return
190190 }
191191 lm .logger .Info ("Disable thing completed successfully" , args ... )
@@ -222,7 +222,7 @@ func (lm *loggingMiddleware) Identify(ctx context.Context, key string) (id strin
222222 }
223223 if err != nil {
224224 args = append (args , slog .Any ("error" , err ))
225- lm .logger .Warn ("Identify thing failed to complete successfully" , args ... )
225+ lm .logger .Error ("Identify thing failed to complete successfully" , args ... )
226226 return
227227 }
228228 lm .logger .Info ("Identify thing completed successfully" , args ... )
@@ -241,7 +241,7 @@ func (lm *loggingMiddleware) Authorize(ctx context.Context, req *magistrala.Auth
241241 }
242242 if err != nil {
243243 args = append (args , slog .Any ("error" , err ))
244- lm .logger .Warn ("Authorize failed to complete successfully" , args ... )
244+ lm .logger .Error ("Authorize failed to complete successfully" , args ... )
245245 return
246246 }
247247 lm .logger .Info ("Authorize completed successfully" , args ... )
@@ -293,7 +293,7 @@ func (lm *loggingMiddleware) DeleteClient(ctx context.Context, token, id string)
293293 }
294294 if err != nil {
295295 args = append (args , slog .Any ("error" , err ))
296- lm .logger .Warn ("Delete thing failed to complete successfully" , args ... )
296+ lm .logger .Error ("Delete thing failed to complete successfully" , args ... )
297297 return
298298 }
299299 lm .logger .Info ("Delete thing completed successfully" , args ... )
0 commit comments