Skip to content

Commit

Permalink
Fixed sorting inside logging.properties
Browse files Browse the repository at this point in the history
  • Loading branch information
dmatej committed Jul 29, 2022
1 parent 6b4b1e5 commit ccb7735
Showing 1 changed file with 5 additions and 11 deletions.
Expand Up @@ -85,22 +85,16 @@ public class LoggingConfigImpl implements LoggingConfig, PostConstruct {
@Inject
FileMonitoring fileMonitoring;

Properties props = new Properties();
LoggingProperties props = new LoggingProperties();
String loggingPropertiesName;
File loggingConfigDir = null;

/**
* Constructor
*/

@Override
public void postConstruct() {
// set logging.properties filename
setupConfigDir(env.getConfigDirPath(), env.getLibPath());

}

// this is so the launcher can pass in where the dir is since

public void setupConfigDir(File file, File installDir) {
loggingConfigDir = file;
Expand All @@ -112,7 +106,7 @@ public void setupConfigDir(File file, File installDir) {
* Load the properties for DAS
*/
private void loadLoggingProperties() throws IOException {
props = new Properties();
props = new LoggingProperties();
File file = getLoggingPropertiesFile();
try (InputStream fis = openPropertyFile(file)) {
props.load(fis);
Expand All @@ -124,7 +118,7 @@ private void loadLoggingProperties() throws IOException {
* Load the properties for given target.
*/
private void loadLoggingProperties(String target) throws IOException {
props = new Properties();
props = new LoggingProperties();
File file = getLoggingPropertiesFile(target);
try (InputStream fis = openPropertyFile(file)) {
props.load(fis);
Expand Down Expand Up @@ -296,7 +290,7 @@ public synchronized Map<String, String> updateLoggingProperties(Map<String, Stri
setWebLoggers(e.getValue());
}

//build Map of entries to return
// build Map of entries to return
m.put(key, property);

}
Expand Down Expand Up @@ -674,7 +668,7 @@ public Map<String, String> getDefaultLoggingProperties() throws IOException {
try {
File loggingTemplateFile = new File(env.getConfigDirPath(),
ServerEnvironmentImpl.kDefaultLoggingPropertiesFileName);
fisForLoggingTemplate = new java.io.FileInputStream(loggingTemplateFile);
fisForLoggingTemplate = new FileInputStream(loggingTemplateFile);
propsLoggingTempleate.load(fisForLoggingTemplate);
} finally {
safeCloseStream(fisForLoggingTemplate);
Expand Down

0 comments on commit ccb7735

Please sign in to comment.