19
19
import java .util .*;
20
20
import java .util .concurrent .TimeUnit ;
21
21
import java .util .stream .Collectors ;
22
- import org .apache .logging .log4j .LogManager ;
23
- import org .apache .logging .log4j .Logger ;
24
22
import org .influxdb .dto .BatchPoints ;
25
23
import org .influxdb .dto .Point ;
24
+ import org .slf4j .Logger ;
25
+ import org .slf4j .LoggerFactory ;
26
26
27
27
/** InfluxDB Sink for result and time series data */
28
28
public class InfluxDbSink implements OutputDataSink {
29
- private static final Logger log = LogManager .getLogger (InfluxDbSink .class );
29
+ public static final Logger log = LoggerFactory .getLogger (InfluxDbSink .class );
30
30
/** Field name for time */
31
31
private static final String FIELD_NAME_TIME = "time" ;
32
32
/** Field name for input model uuid field in result entities */
@@ -151,8 +151,8 @@ private Optional<Point> transformToPoint(ResultEntity entity, String measurement
151
151
} catch (SinkException e ) {
152
152
log .error (
153
153
"Cannot persist provided entity '{}'. Exception: {}" ,
154
- () -> entity .getClass ().getSimpleName (),
155
- () -> e );
154
+ entity .getClass ().getSimpleName (),
155
+ e );
156
156
}
157
157
return Optional .empty ();
158
158
}
@@ -218,7 +218,7 @@ private <E extends TimeSeriesEntry<V>, V extends Value> Set<Point> transformToPo
218
218
points .add (point );
219
219
}
220
220
} catch (SinkException e ) {
221
- log .error ("Cannot persist provided time series '{}'. Exception: {}" , () -> key , () -> e );
221
+ log .error ("Cannot persist provided time series '{}'. Exception: {}" , key , e );
222
222
}
223
223
return points ;
224
224
}
@@ -244,8 +244,8 @@ private <C extends UniqueEntity> Set<Point> extractPoints(C entity) {
244
244
} catch (SinkException e ) {
245
245
log .error (
246
246
"Cannot persist provided entity '{}'. Exception: {}" ,
247
- () -> entity .getClass ().getSimpleName (),
248
- () -> e );
247
+ entity .getClass ().getSimpleName (),
248
+ e );
249
249
}
250
250
} else if (entity instanceof TimeSeries ) {
251
251
TimeSeries <?, ?> timeSeries = (TimeSeries <?, ?>) entity ;
0 commit comments