예제 #1
0
  protected void initializeRedis() {
    ConfigurationSection config = getConfig().getConfigurationSection("redis");
    String host = config.getString("host", "localhost");
    int port = config.getInt("port", 6379);
    int timeout = config.getInt("timeout", 5000);

    redisClient = new RedisClient(host, port);
    redisClient.setDefaultTimeout(timeout, TimeUnit.MILLISECONDS);

    log("Connecting to Redis at %s:%d", host, port);
    log("  Ping? %s", redis().ping());
    log("  Found %d keys", redis().dbsize());
  }
예제 #2
0
 public void debug(String message) {
   log(Level.FINE, message);
 }
예제 #3
0
 public void log(Level level, String message, Object... args) {
   log(level, String.format(message, args));
 }
예제 #4
0
 public void log(String message, Object... args) {
   log(String.format(message, args));
 }
예제 #5
0
 public void log(String message) {
   log(Level.INFO, message);
 }