dropwizard-logging-config

Runtime Configuration for Dropwizard Logging

Лицензия

Лицензия

Категории

Категории

DropWizard Контейнер Микросервисы config Библиотеки уровня приложения Configuration Logging
Группа

Группа

org.stuartgunter
Идентификатор

Идентификатор

dropwizard-logging-config
Последняя версия

Последняя версия

0.1
Дата

Дата

Тип

Тип

jar
Описание

Описание

dropwizard-logging-config
Runtime Configuration for Dropwizard Logging
Ссылка на сайт

Ссылка на сайт

http://www.stuartgunter.org/open-source.html
Организация-разработчик

Организация-разработчик

Stuart Gunter
Система контроля версий

Система контроля версий

https://github.com/stuartgunter/dropwizard-logging-config

Скачать dropwizard-logging-config

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/org.stuartgunter/dropwizard-logging-config/ -->
<dependency>
    <groupId>org.stuartgunter</groupId>
    <artifactId>dropwizard-logging-config</artifactId>
    <version>0.1</version>
</dependency>
// https://jarcasting.com/artifacts/org.stuartgunter/dropwizard-logging-config/
implementation 'org.stuartgunter:dropwizard-logging-config:0.1'
// https://jarcasting.com/artifacts/org.stuartgunter/dropwizard-logging-config/
implementation ("org.stuartgunter:dropwizard-logging-config:0.1")
'org.stuartgunter:dropwizard-logging-config:jar:0.1'
<dependency org="org.stuartgunter" name="dropwizard-logging-config" rev="0.1">
  <artifact name="dropwizard-logging-config" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.stuartgunter', module='dropwizard-logging-config', version='0.1')
)
libraryDependencies += "org.stuartgunter" % "dropwizard-logging-config" % "0.1"
[org.stuartgunter/dropwizard-logging-config "0.1"]

Зависимости

provided (1)

Идентификатор библиотеки Тип Версия
io.dropwizard : dropwizard-core jar 0.7.1

test (2)

Идентификатор библиотеки Тип Версия
junit : junit jar 4.11
org.assertj : assertj-core jar 1.6.1

Модули Проекта

Данный проект не имеет модулей.

dropwizard-logging-config

Build Status

Note: This task is included in the Dropwizard core since v0.8.0 and is enabled by default for the admin environment.

The dropwizard-logging-config library allows you to configure Logback within a Dropwizard app at runtime. It provides a Dropwizard Task that can be made accessible via the admin interface to allow for runtime changes to the logging level of any logger in the application. This is intended to provide similar functionality to Logback's JmxConfigurator, but using a standard Dropwizard approach.

Usage

To use this task, simply register it in your Dropwizard application. The dependency can be found in Maven Central with the following coordinates:

<dependency>
  <groupId>org.stuartgunter</groupId>
  <artifactId>dropwizard-logging-config</artifactId>
  <version>${dropwizard-logging-config.version}</version>
</dependency>

Once you have the dependency registered, register the LogConfigurationTask in your application as follows:

public class YourApp extends Application<YourConfig> {

    @Override
    public void run(YourConfig configuration, Environment environment) throws Exception {
        environment.admin().addTask(new LogConfigurationTask());
    }
}

That's all you need to do in code. All that remains is to call the tasks endpoint correctly. Below are some examples of how you can do that.

Configure a user-defined log level for a single Logger

curl -X POST -d "logger=org.stuartgunter.dropwizard&level=INFO" http://localhost:8081/tasks/log-level

Configure a user-defined log level for multiple Loggers

curl -X POST -d "logger=org.stuartgunter.dropwizard&logger=io.dropwizard.core&level=INFO" http://localhost:8081/tasks/log-level

Configure the default log level for a single Logger

curl -X POST -d "logger=org.stuartgunter.dropwizard" http://localhost:8081/tasks/log-level

Версии библиотеки

Версия
0.1