com.sap.hcp.cf.logging.sample.springboot.statistics.StatisticsContextFieldSupplier Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sample-app-spring-boot Show documentation
Show all versions of sample-app-spring-boot Show documentation
Logging Sample App for Spring Boot
The newest version!
package com.sap.hcp.cf.logging.sample.springboot.statistics;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.atomic.AtomicLong;
import com.sap.hcp.cf.logging.common.serialization.ContextFieldSupplier;
public class StatisticsContextFieldSupplier implements ContextFieldSupplier {
private static final String KEY = "message_count";
private static AtomicLong count = new AtomicLong();
@SuppressWarnings("serial")
@Override
public Map get() {
return new HashMap() {
{
put(KEY, count.incrementAndGet());
}
};
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy