Ejemplo n.º 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());
  }
Ejemplo n.º 2
0
 public void debug(String message) {
   log(Level.FINE, message);
 }
Ejemplo n.º 3
0
 public void log(Level level, String message, Object... args) {
   log(level, String.format(message, args));
 }
Ejemplo n.º 4
0
 public void log(String message, Object... args) {
   log(String.format(message, args));
 }
Ejemplo n.º 5
0
 public void log(String message) {
   log(Level.INFO, message);
 }