Package io.dropwizard.servlets.tasks
Class LogConfigurationTask
- java.lang.Object
-
- io.dropwizard.servlets.tasks.Task
-
- io.dropwizard.servlets.tasks.LogConfigurationTask
-
public class LogConfigurationTask extends Task
Sets the logging level for a number of loggersParameters:
Name Description logger One or more logger names to be configured with the specified log level. level An optional Levelto configure. If not provided, the log level will be set to null.duration An optional Durationto configure the level. If not provided, the log level will be set forever.
-
-
Constructor Summary
Constructors Constructor Description LogConfigurationTask()Creates a new LogConfigurationTask.LogConfigurationTask(org.slf4j.ILoggerFactory loggerContext)Creates a new LogConfigurationTask with the givenILoggerFactoryinstance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidexecute(Map<String,List<String>> parameters, PrintWriter output)Executes the task.-
Methods inherited from class io.dropwizard.servlets.tasks.Task
getName, getResponseContentType
-
-
-
-
Constructor Detail
-
LogConfigurationTask
public LogConfigurationTask()
Creates a new LogConfigurationTask.
-
LogConfigurationTask
public LogConfigurationTask(org.slf4j.ILoggerFactory loggerContext)
Creates a new LogConfigurationTask with the givenILoggerFactoryinstance. UseLogConfigurationTask()instead.- Parameters:
loggerContext- aILoggerFactoryinstance
-
-
Method Detail
-
execute
public void execute(Map<String,List<String>> parameters, PrintWriter output) throws Exception
Description copied from class:TaskExecutes the task.- Specified by:
executein classTask- Parameters:
parameters- the query string parametersoutput- aPrintWriterwrapping the output stream of the task- Throws:
Exception- if something goes wrong
-
-