Package io.dropwizard.servlets.tasks
Class LogConfigurationTask
java.lang.Object
io.dropwizard.servlets.tasks.Task
io.dropwizard.servlets.tasks.LogConfigurationTask
Sets the logging level for a number of loggers
Parameters:
Name | Description |
logger | One or more logger names to be configured with the specified log level. |
level | An optional Level to configure. If not provided, the log level will be set to null. |
duration | An optional Duration to configure the level. If not provided, the log level will be set forever. |
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new LogConfigurationTask.LogConfigurationTask
(org.slf4j.ILoggerFactory loggerContext) Creates a new LogConfigurationTask with the givenILoggerFactory
instance. -
Method Summary
Methods inherited from class io.dropwizard.servlets.tasks.Task
getName, getResponseContentType
-
Constructor Details
-
LogConfigurationTask
public LogConfigurationTask()Creates a new LogConfigurationTask. -
LogConfigurationTask
public LogConfigurationTask(org.slf4j.ILoggerFactory loggerContext) Creates a new LogConfigurationTask with the givenILoggerFactory
instance. UseLogConfigurationTask()
instead.- Parameters:
loggerContext
- aILoggerFactory
instance
-
-
Method Details
-
execute
Description copied from class:Task
Executes the task.- Specified by:
execute
in classTask
- Parameters:
parameters
- the query string parametersoutput
- aPrintWriter
wrapping the output stream of the task- Throws:
Exception
- if something goes wrong
-