Merge pull request #837 from nosqlbench/nosqlbench-835-count-warning

nosqlbench-835-count-warning
This commit is contained in:
Jonathan Shook 2022-12-09 17:23:32 -06:00 committed by GitHub
commit 21eb031da9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -30,11 +30,14 @@ import org.apache.logging.log4j.Logger;
@Service(value = ErrorHandler.class, selector = "count") @Service(value = ErrorHandler.class, selector = "count")
public class CountErrorHandler extends CounterErrorHandler { public class CountErrorHandler extends CounterErrorHandler {
public CountErrorHandler() {
logger.warn("Starting with v4.17 onward, use 'counter'. See cql-errors.md for usage.");
}
private static final Logger logger = LogManager.getLogger(CountErrorHandler.class); private static final Logger logger = LogManager.getLogger(CountErrorHandler.class);
@Override @Override
public ErrorDetail handleError(String name, Throwable t, long cycle, long durationInNanos, ErrorDetail detail) { public ErrorDetail handleError(String name, Throwable t, long cycle, long durationInNanos, ErrorDetail detail) {
logger.warn("Starting with v4.17 onward, use 'counter'. See cql-errors.md for usage.");
return super.handleError(name, t, cycle, durationInNanos, detail); return super.handleError(name, t, cycle, durationInNanos, detail);
} }
} }