Fixed error in path recognizing for config dir in distribution
This commit is contained in:
@@ -187,8 +187,9 @@ public class SimpleMessaging implements IMessaging, EventHandler<ValueEvent> {
|
||||
|
||||
subscriptions.init(m_storageService);
|
||||
|
||||
String path = props.getProperty("password_file");
|
||||
IAuthenticator authenticator = new FileAuthenticator(path);
|
||||
String passwdPath = props.getProperty("password_file");
|
||||
String configPath = System.getProperty("moquette.path", "");
|
||||
IAuthenticator authenticator = new FileAuthenticator(configPath + passwdPath);
|
||||
|
||||
m_processor.init(subscriptions, m_storageService, authenticator);
|
||||
}
|
||||
|
||||
@@ -40,9 +40,10 @@ public class Server {
|
||||
public void startServer() throws IOException {
|
||||
ConfigurationParser confParser = new ConfigurationParser();
|
||||
try {
|
||||
confParser.parse(new File("config/moquette.conf"));
|
||||
String configPath = System.getProperty("moquette.path", "");
|
||||
confParser.parse(new File(configPath + "config/moquette.conf"));
|
||||
} catch (ParseException pex) {
|
||||
LOG.warn("An error occured in parsing configuration, fallback on deafult configuration", pex);
|
||||
LOG.warn("An error occured in parsing configuration, fallback on default configuration", pex);
|
||||
}
|
||||
Properties configProps = confParser.getProperties();
|
||||
|
||||
|
||||
@@ -1,13 +1,6 @@
|
||||
# Set root logger level to DEBUG and its only appender to A1.
|
||||
#log4j.rootLogger=ERROR, A1
|
||||
log4j.rootLogger=ERROR, stdout, file
|
||||
#log4j.rootLogger=WARN, A1
|
||||
#log4j.logger.org.dna.mqtt.moquette.client=WARN
|
||||
#log4j.logger.org.mina=WARN
|
||||
#log4j.logger.org.dna.mqtt.moquette.server=DEBUG
|
||||
#log4j.logger.org.dna.mqtt.moquette.messaging=DEBUG
|
||||
#log4j.logger.org.dna.mqtt.moquette.proto.MQTTLoggingFilter=DEBUG
|
||||
#log4j.logger.org.dna.mqtt.moquette.proto.PublishDecoder=DEBUG
|
||||
|
||||
log4j.logger.org.dna.mqtt=INFO
|
||||
log4j.logger.org.dna.mqtt.moquette.server.ServerIntegrationFuseTest=DEBUG
|
||||
|
||||
Reference in New Issue
Block a user