use of org.apache.geode.distributed.ConfigurationProperties in project geode by apache.
the class CacheServerLauncher method isLoggingToStdOut.
/**
* Reads {@link DistributedSystem#PROPERTY_FILE} and determines if the
* {@link ConfigurationProperties#LOG_FILE} property is set to stdout
*
* @return true if the logging would go to stdout
*/
private static boolean isLoggingToStdOut() {
Properties gfprops = new Properties();
URL url = DistributedSystem.getPropertyFileURL();
if (url != null) {
try {
gfprops.load(url.openStream());
} catch (IOException io) {
// throw new GemFireIOException("Failed reading " + url, io);
System.out.println("Failed reading " + url);
System.exit(1);
}
final String logFile = gfprops.getProperty(LOG_FILE);
if (logFile == null || logFile.length() == 0) {
return true;
}
} else {
// Didnt find a property file, assuming the default is to log to stdout
return true;
}
return false;
}
Aggregations