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
- Author:
- Ben Hale, Phillip Webb
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumSupported logger configuration scopes.static final classLogger level configuration. -
Constructor Summary
ConstructorsConstructorDescriptionLoggerConfiguration(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 TypeMethodDescriptionbooleanReturns 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.inthashCode()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
nullfordirect scoperesults without applied configuration - Since:
- 2.7.13
-
equals
-
hashCode
public int hashCode() -
toString
-