@@ -309,17 +309,16 @@ public static PolicyViolations executePolicyViolations(RESTAuth auth, String que
309
309
}
310
310
311
311
public static Events executeEvents (RESTAuth auth , String query ){
312
+
312
313
if (client == null ) {
313
314
createConnection (auth );
314
315
}
315
316
316
317
317
- if (s .debugLevel > 1 ) logger .log (Level .INFO ,new StringBuilder ().append ("Query:\n " ).append (query ).toString ());
318
+ if (s .debugLevel > 1 ) logger .log (Level .INFO ,new StringBuilder ().append ("\n executeEvents Query:\n " ).append (query ).toString ());
318
319
319
320
WebResource service = client .resource (query );
320
321
321
- if (s .debugLevel > 1 ) logger .log (Level .INFO ,new StringBuilder ().append ("WebResource: " ).append (service .toString ()).toString ());
322
-
323
322
ClientResponse response = null ;
324
323
Events evs =null ;
325
324
try {
@@ -331,19 +330,13 @@ public static Events executeEvents(RESTAuth auth, String query){
331
330
.append (query ).append ("\n Error:" ).append (e .getMessage ()).append (". Response code " )
332
331
.append (response .getStatus ()).toString ());
333
332
}
334
-
335
- if (s .debugLevel > 1 ) logger .log (Level .INFO ,new StringBuilder ().append ("\n We executed the whole query without exception" ).toString ());
336
-
333
+
337
334
if (s .debugLevel > 1 && evs != null ){
338
335
logger .log (Level .INFO ,new StringBuilder ().append ("Number of events returns is " ).append (evs .getEvents ().size ()).toString ());
339
336
}
340
337
341
- if (s .debugLevel > 1 ) logger .log (Level .INFO ,new StringBuilder ().append ("\n First debug message was executed. " ).toString ());
342
-
343
338
if (s .debugLevel > 2 && evs != null ) logger .log (Level .FINE ,new StringBuilder ().append (evs .toString ()).toString ());
344
339
345
- if (s .debugLevel > 1 ) logger .log (Level .INFO ,new StringBuilder ().append ("\n Past the debug stuff, returning. " ).toString ());
346
-
347
340
return evs ;
348
341
}
349
342
0 commit comments