Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package com.fasterxml.clustermate.client;
 
 import  org.slf4j.Logger;
 import  org.slf4j.LoggerFactory;

Base class defined just to allow overriding logging of warning messages, should someone deeply care
 
public abstract class Loggable
    protected final Logger _logger;
    protected Loggable() {
         = LoggerFactory.getLogger(getClass());
    }
    
    protected Loggable(Class<?> loggingFor) {
         = LoggerFactory.getLogger(loggingFor);
    }
    public boolean isInfoEnabled() {
        return .isInfoEnabled();
    }
    
    public void logInfo(String msg) {
        .info(msg);
    }
    public void logInfo(String msgObject... args) {
        .info(msgargs);
    }
    
    public void logWarn(String msg) {
        .warn(msg);
    }
    public void logWarn(String msgObject... args) {
        .warn(msgargs);
    }
    
    public void logWarn(Throwable tString msg) {
        .warn(msgt);
    }
    public void logError(String msg) {
        .error(msg);
    }
    public void logError(String msgObject... args) {
        .error(msgargs);
    }
    
    public void logError(Throwable tString msg) {
        .error(msgt);
    }

    
Accessor method that should ONLY be called by tests to possibly suppress logging of some entries.
    public Logger getLogger() {
        return ;
    }
New to GrepCode? Check out our FAQ X