io.quarkus.runtime.logging.LogBuildTimeConfig Maven / Gradle / Ivy
package io.quarkus.runtime.logging;
import java.util.Map;
import java.util.logging.Level;
import io.quarkus.runtime.annotations.ConfigDocSection;
import io.quarkus.runtime.annotations.ConfigPhase;
import io.quarkus.runtime.annotations.ConfigRoot;
import io.smallrye.config.ConfigMapping;
import io.smallrye.config.WithConverter;
import io.smallrye.config.WithDefault;
import io.smallrye.config.WithName;
/**
* Logging
*/
@ConfigMapping(prefix = "quarkus.log")
@ConfigRoot(phase = ConfigPhase.BUILD_AND_RUN_TIME_FIXED)
public interface LogBuildTimeConfig {
/**
* If enabled and a metrics extension is present, logging metrics are published.
*/
@WithName("metrics.enabled")
@WithDefault("false")
boolean metricsEnabled();
/**
* The default minimum log level.
*/
@WithDefault("DEBUG")
@WithConverter(LevelConverter.class)
Level minLevel();
/**
* This will decorate the stacktrace in dev mode to show the line in the code that cause the exception
*/
@WithDefault("true")
boolean decorateStacktraces();
/**
* Minimum logging categories.
*
* Logging is done on a per-category basis. Each category can be configured independently.
* A configuration that applies to a category will also apply to all sub-categories of that category,
* unless there is a more specific matching sub-category configuration.
*/
@WithName("category")
@ConfigDocSection
Map categories();
interface CategoryBuildTimeConfig {
/**
* The minimum log level for this category.
* By default, all categories are configured with DEBUG
minimum level.
*
* To get runtime logging below DEBUG
, e.g., TRACE
,
* adjust the minimum level at build time. The right log level needs to be provided at runtime.
*
* As an example, to get TRACE
logging,
* minimum level needs to be at TRACE
, and the runtime log level needs to match that.
*/
@WithDefault("inherit")
InheritableLevel minLevel();
}
}