biz.paluch.logging.gelf.standalone.DefaultGelfSenderConfiguration Maven / Gradle / Ivy
package biz.paluch.logging.gelf.standalone;
import java.util.HashMap;
import java.util.Map;
import biz.paluch.logging.gelf.intern.ErrorReporter;
import biz.paluch.logging.gelf.intern.GelfSenderConfiguration;
/**
* Default Gelf sender configuration for standalone use.
*
* @author Mark Paluch
* @since 21.07.14 17:34
*/
public class DefaultGelfSenderConfiguration implements GelfSenderConfiguration {
private ErrorReporter errorReporter;
private String host;
private int port;
protected Map specificConfigurations = new HashMap();
public DefaultGelfSenderConfiguration() {
errorReporter = new Slf4jErrorReporter();
}
public DefaultGelfSenderConfiguration(ErrorReporter errorReporter) {
this.errorReporter = errorReporter;
}
@Override
public String getHost() {
return host;
}
@Override
public int getPort() {
return port;
}
@Override
public ErrorReporter getErrorReporter() {
return errorReporter;
}
public void setErrorReporter(ErrorReporter errorReporter) {
this.errorReporter = errorReporter;
}
public void setHost(String host) {
this.host = host;
}
public void setPort(int port) {
this.port = port;
}
@Override
public Map getSpecificConfigurations() {
return specificConfigurations;
}
public void setSpecificConfigurations(Map specificConfigurations) {
this.specificConfigurations = specificConfigurations;
}
}