Skip to content

Commit

Permalink
Fix the log statement
Browse files Browse the repository at this point in the history
  • Loading branch information
Rithika committed Jul 21, 2023
1 parent 9195f53 commit 06fee14
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ enum Type {

AggregateFunction add( DataPoint v, int now );

static final Logger log = LoggerFactory.getLogger( AggregateFunction.class );

static AggregateFunction create( String key, MetricAggregationMethod method)
{
switch (method)
Expand Down Expand Up @@ -63,13 +65,14 @@ static class SumAggregateFunction
implements AggregateFunction
{
double sum = 0;
static final Logger logger = LoggerFactory.getLogger( SumAggregateFunction.class );

@Override
public synchronized AggregateFunction add( DataPoint dataPoint, int now )
{
sum += dataPoint.val;
log.info("Calculating the sum for aggreggate function");
log.info("Print the datapoint name: " + dataPoint.name);
logger.info("Calculating the sum for aggreggate function");
logger.info("Print the datapoint name: " + dataPoint.name);
return this;
}

Expand Down

0 comments on commit 06fee14

Please sign in to comment.