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 void
configure(com.codahale.metrics.MetricRegistry metricRegistry, String name)
List<AppenderFactory<ch.qos.logback.classic.spi.ILoggingEvent>>
getAppenders()
String
getLevel()
Map<String,com.fasterxml.jackson.databind.JsonNode>
getLoggers()
void
reset()
Mainly useful in testing to reset the logging to a sane default before the next test configures logging to a desired level.void
setAppenders(List<AppenderFactory<ch.qos.logback.classic.spi.ILoggingEvent>> appenders)
void
setLevel(String level)
void
setLoggers(Map<String,com.fasterxml.jackson.databind.JsonNode> loggers)
void
stop()
Should flush all log messages but not disable loggingString
toString()
-
-
-
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:
configure
in interfaceLoggingFactory
-
stop
public void stop()
Description copied from interface:LoggingFactory
Should flush all log messages but not disable logging- Specified by:
stop
in interfaceLoggingFactory
-
reset
public void reset()
Description copied from interface:LoggingFactory
Mainly useful in testing to reset the logging to a sane default before the next test configures logging to a desired level.- Specified by:
reset
in interfaceLoggingFactory
-
-