File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed
core/src/main/java/org/elasticsearch/common Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change 29
29
30
30
public class MacAddressProvider {
31
31
32
+ private static final ESLogger logger = Loggers .getLogger (MacAddressProvider .class );
33
+
32
34
private static byte [] getMacAddress () throws SocketException {
33
35
Enumeration <NetworkInterface > en = NetworkInterface .getNetworkInterfaces ();
34
36
if (en != null ) {
@@ -64,15 +66,11 @@ public static byte[] getSecureMungedAddress() {
64
66
try {
65
67
address = getMacAddress ();
66
68
} catch ( SocketException se ) {
67
- // only grab the logger when necessary, since the logging system may not be setup yet
68
- ESLogger logger = Loggers .getLogger (MacAddressProvider .class );
69
69
logger .warn ("Unable to get mac address, will use a dummy address" , se );
70
70
// address will be set below
71
71
}
72
72
73
73
if (!isValidAddress (address )) {
74
- // only grab the logger when necessary, since the logging system may not be setup yet
75
- ESLogger logger = Loggers .getLogger (MacAddressProvider .class );
76
74
logger .warn ("Unable to get a valid mac address, will use a dummy address" );
77
75
address = constructDummyMulticastAddress ();
78
76
}
You can’t perform that action at this time.
0 commit comments