Skip to content

Commit ed56e8c

Browse files
benwtrentgmjehovich
authored andcommitted
Removing duplicate logger declaration (elastic#135136)
1 parent 2d18f3f commit ed56e8c

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

server/src/main/java/org/elasticsearch/index/store/FsDirectoryFactory.java

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646

4747
public class FsDirectoryFactory implements IndexStorePlugin.DirectoryFactory {
4848

49+
private static final Logger Log = LogManager.getLogger(FsDirectoryFactory.class);
4950
private static final int sharedArenaMaxPermits;
5051
static {
5152
String prop = System.getProperty(SHARED_ARENA_MAX_PERMITS_SYSPROP);
@@ -54,17 +55,12 @@ public class FsDirectoryFactory implements IndexStorePlugin.DirectoryFactory {
5455
try {
5556
value = Integer.parseInt(prop); // ensure it's a valid integer
5657
} catch (NumberFormatException e) {
57-
Logger logger = LogManager.getLogger(FsDirectoryFactory.class);
58-
logger.warn(
59-
() -> "unable to parse system property [" + SHARED_ARENA_MAX_PERMITS_SYSPROP + "] with value [" + prop + "]",
60-
e
61-
);
58+
Log.warn(() -> "unable to parse system property [" + SHARED_ARENA_MAX_PERMITS_SYSPROP + "] with value [" + prop + "]", e);
6259
}
6360
}
6461
sharedArenaMaxPermits = value; // default to 1
6562
}
6663

67-
private static final Logger Log = LogManager.getLogger(FsDirectoryFactory.class);
6864
private static final FeatureFlag MADV_RANDOM_FEATURE_FLAG = new FeatureFlag("madv_random");
6965

7066
public static final Setting<LockFactory> INDEX_LOCK_FACTOR_SETTING = new Setting<>("index.store.fs.fs_lock", "native", (s) -> {

0 commit comments

Comments
 (0)