Class LoggerConfiguration
java.lang.Object
org.springframework.boot.logging.LoggerConfiguration
Immutable class that represents the configuration of a
LoggingSystem
's logger.- Since:
- 1.5.0
- Author:
- Ben Hale, Phillip Webb
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
Supported logger configuration scopes.static final class
Logger level configuration. -
Constructor Summary
ConstructorsConstructorDescriptionLoggerConfiguration
(String name, @Nullable LogLevel configuredLevel, LogLevel effectiveLevel) Create a newinstance
.LoggerConfiguration
(String name, @Nullable LoggerConfiguration.LevelConfiguration levelConfiguration, LoggerConfiguration.LevelConfiguration inheritedLevelConfiguration) Create a newinstance
. -
Method Summary
Modifier and TypeMethodDescriptionboolean
@Nullable LogLevel
Returns the configured level of the logger.Returns the effective level of the logger.Return the level configuration, considering inherited loggers.@Nullable LoggerConfiguration.LevelConfiguration
Return the level configuration for the given scope.getName()
Returns the name of the logger.int
hashCode()
toString()
-
Constructor Details
-
LoggerConfiguration
-
LoggerConfiguration
public LoggerConfiguration(String name, @Nullable LoggerConfiguration.LevelConfiguration levelConfiguration, LoggerConfiguration.LevelConfiguration inheritedLevelConfiguration) Create a newinstance
.- Parameters:
name
- the name of the loggerlevelConfiguration
- the level configurationinheritedLevelConfiguration
- the inherited level configuration- Since:
- 2.7.13
-
-
Method Details
-
getName
-
getConfiguredLevel
Returns the configured level of the logger.- Returns:
- the configured level of the logger
- See Also:
-
getEffectiveLevel
Returns the effective level of the logger.- Returns:
- the effective level of the logger
- See Also:
-
getLevelConfiguration
Return the level configuration, considering inherited loggers.- Returns:
- the level configuration
- Since:
- 2.7.13
-
getLevelConfiguration
public @Nullable LoggerConfiguration.LevelConfiguration getLevelConfiguration(LoggerConfiguration.ConfigurationScope scope) Return the level configuration for the given scope.- Parameters:
scope
- the configuration scope- Returns:
- the level configuration or
null
fordirect scope
results without applied configuration - Since:
- 2.7.13
-
equals
-
hashCode
-
toString
-