Package org.springframework.boot.logging
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
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
Supported logger configuration scopes.static final class
Logger level configuration. -
Constructor Summary
ConstructorDescriptionLoggerConfiguration
(String name, LoggerConfiguration.LevelConfiguration levelConfiguration, LoggerConfiguration.LevelConfiguration inheritedLevelConfiguration) Create a newinstance
.LoggerConfiguration
(String name, LogLevel configuredLevel, LogLevel effectiveLevel) Create a newinstance
. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns the configured level of the logger.Returns the effective level of the logger.Return the level configuration, considering inherited loggers.Return the level configuration for the given scope.getName()
Returns the name of the logger.int
hashCode()
toString()
-
Constructor Details
-
LoggerConfiguration
Create a newinstance
.- Parameters:
name
- the name of the loggerconfiguredLevel
- the configured level of the loggereffectiveLevel
- the effective level of the logger
-
LoggerConfiguration
public LoggerConfiguration(String name, 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
Returns the name of the logger.- Returns:
- the name of the logger
-
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 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
public int hashCode() -
toString
-