com.aerospike.jdbc.util.AerospikeClientLogger Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of aerospike-jdbc Show documentation
Show all versions of aerospike-jdbc Show documentation
A JDBC driver for the Aerospike database
The newest version!
package com.aerospike.jdbc.util;
import com.aerospike.client.Log;
import java.util.logging.Logger;
import static java.lang.String.format;
public class AerospikeClientLogger implements Log.Callback {
private static final Logger logger = Logger.getLogger(AerospikeClientLogger.class.getName());
@Override
public void log(Log.Level level, String message) {
switch (level) {
case DEBUG:
logger.fine(message);
break;
case INFO:
logger.info(message);
break;
case WARN:
logger.warning(message);
break;
case ERROR:
logger.severe(message);
break;
default:
logger.warning(() -> format("Unexpected Aerospike client log level %s. Message: %s",
level, message));
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy