Package io.dropwizard.logging.common
Class DefaultLoggingFactory
- java.lang.Object
-
- io.dropwizard.logging.common.DefaultLoggingFactory
-
- All Implemented Interfaces:
Discoverable,LoggingFactory
public class DefaultLoggingFactory extends Object implements LoggingFactory
-
-
Constructor Summary
Constructors Constructor Description DefaultLoggingFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconfigure(com.codahale.metrics.MetricRegistry metricRegistry, String name)List<AppenderFactory<ch.qos.logback.classic.spi.ILoggingEvent>>getAppenders()StringgetLevel()Map<String,com.fasterxml.jackson.databind.JsonNode>getLoggers()voidreset()Mainly useful in testing to reset the logging to a sane default before the next test configures logging to a desired level.voidsetAppenders(List<AppenderFactory<ch.qos.logback.classic.spi.ILoggingEvent>> appenders)voidsetLevel(String level)voidsetLoggers(Map<String,com.fasterxml.jackson.databind.JsonNode> loggers)voidstop()Should flush all log messages but not disable loggingStringtoString()
-
-
-
Method Detail
-
getLevel
public String getLevel()
-
setLevel
public void setLevel(String level)
-
getAppenders
public List<AppenderFactory<ch.qos.logback.classic.spi.ILoggingEvent>> getAppenders()
-
setAppenders
public void setAppenders(List<AppenderFactory<ch.qos.logback.classic.spi.ILoggingEvent>> appenders)
-
configure
public void configure(com.codahale.metrics.MetricRegistry metricRegistry, String name)- Specified by:
configurein interfaceLoggingFactory
-
stop
public void stop()
Description copied from interface:LoggingFactoryShould flush all log messages but not disable logging- Specified by:
stopin interfaceLoggingFactory
-
reset
public void reset()
Description copied from interface:LoggingFactoryMainly useful in testing to reset the logging to a sane default before the next test configures logging to a desired level.- Specified by:
resetin interfaceLoggingFactory
-
-