Skip to content

Commit

Permalink
Merged in removeJava8code (pull request payara#632)
Browse files Browse the repository at this point in the history
Removed Java 8 code from LoggingConfigImpl.java
  • Loading branch information
MeroRai authored and Pandrex247 committed Apr 23, 2019
2 parents 43ada15 + 086f661 commit a3d43b3
Showing 1 changed file with 20 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@
import org.jvnet.hk2.annotations.Contract;
import org.jvnet.hk2.annotations.Service;

import static com.sun.common.util.logging.LoggingXMLNames.xmltoPropsMap;


/**
Expand Down Expand Up @@ -435,29 +434,30 @@ private void addDirectory(ZipOutputStream zout, File fileSource, int ignoreLengt
}
}
}
/* Return a logging file details in the logging.properties file.

/* Return a logging file details in the logging.properties file.
* @throws IOException
*/
*/

public synchronized String getLoggingFileDetails() throws IOException {
loadLoggingProperties();

@SuppressWarnings("unchecked")
Enumeration<String> loggingPropertyNames = (Enumeration<String>) props.propertyNames();

while (loggingPropertyNames.hasMoreElements()) {
String key = loggingPropertyNames.nextElement();

// Convert the name in domain.xml to the name in logging.properties if needed
key = xmltoPropsMap.getOrDefault(key, key);
try {
loadLoggingProperties();
Enumeration e = props.propertyNames();

while (e.hasMoreElements()) {
String key = (String) e.nextElement();
// convert the name in domain.xml to the name in logging.properties if needed
if (LoggingXMLNames.xmltoPropsMap.get(key) != null) {
key = LoggingXMLNames.xmltoPropsMap.get(key);
}

if (key != null && key.equals("com.sun.enterprise.server.logging.GFFileHandler.file")) {
return props.getProperty(key);
if (key != null && key.equals("com.sun.enterprise.server.logging.GFFileHandler.file")) {
return props.getProperty(key);
}
}
} catch (IOException ex) {
throw ex;
}

// If "com.sun.enterprise.server.logging.GFFileHandler.file" not found, check "java.util.logging.FileHandler.pattern"
// This property can have been set by Payara Micro when using the --logtofile
return props.getProperty("java.util.logging.FileHandler.pattern");
return null;
}
}

0 comments on commit a3d43b3

Please sign in to comment.