LoggerConfigurationComparator Class — spring-boot Architecture
Architecture documentation for the LoggerConfigurationComparator class in LoggerConfigurationComparator.java from the spring-boot codebase.
Entity Profile
Source Code
core/spring-boot/src/main/java/org/springframework/boot/logging/LoggerConfigurationComparator.java lines 29–53
class LoggerConfigurationComparator implements Comparator<LoggerConfiguration> {
private final String rootLoggerName;
/**
* Create a new {@link LoggerConfigurationComparator} instance.
* @param rootLoggerName the name of the "root" logger
*/
LoggerConfigurationComparator(String rootLoggerName) {
Assert.notNull(rootLoggerName, "'rootLoggerName' must not be null");
this.rootLoggerName = rootLoggerName;
}
@Override
public int compare(LoggerConfiguration o1, LoggerConfiguration o2) {
if (this.rootLoggerName.equals(o1.getName())) {
return -1;
}
if (this.rootLoggerName.equals(o2.getName())) {
return 1;
}
return o1.getName().compareTo(o2.getName());
}
}
Source
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free