diff --git a/README.md b/README.md index 03054781..6b4e1e95 100644 --- a/README.md +++ b/README.md @@ -82,6 +82,8 @@ Here is the **[FAQ](https://github.com/Pita/etherpad-lite/wiki/FAQ)** ## Next Steps You can modify the settings in the file `settings.json` +You should use a dedicated database such as "mysql" if you are planning on using etherpad-lite in a production environment, the "dirty" database driver is only for testing and/or development purposes. + You can update to the latest version with `git pull origin`. The next start with bin/run.sh will update the dependencies Look at this wiki pages: diff --git a/node/server.js b/node/server.js index 2bebe6a2..57609ac8 100644 --- a/node/server.js +++ b/node/server.js @@ -91,7 +91,10 @@ async.waterfall([ var httpLogger = log4js.getLogger("http"); app.configure(function() { - app.use(log4js.connectLogger(httpLogger, { level: log4js.levels.INFO, format: ':status, :method :url'})); + // If the log level specified in the config file is WARN or ERROR the application server never starts listening to requests as reported in issue #158. + // Not installing the log4js connect logger when the log level has a higher severity than INFO since it would not log at that level anyway. + if (!(settings.loglevel === "WARN" || settings.loglevel == "ERROR")) + app.use(log4js.connectLogger(httpLogger, { level: log4js.levels.INFO, format: ':status, :method :url'})); app.use(express.cookieParser()); }); diff --git a/settings.json.template b/settings.json.template index a7afaecc..199ac6d0 100644 --- a/settings.json.template +++ b/settings.json.template @@ -8,7 +8,8 @@ "ip": "0.0.0.0", "port" : 9001, - //The Type of the database. You can choose between sqlite and mysql + //The Type of the database. You can choose between dirty, sqlite and mysql + //You should use mysql or sqlite for anything else than testing or development "dbType" : "dirty", //the database specific settings "dbSettings" : { diff --git a/static/js/pad2.js b/static/js/pad2.js index 9df57ae8..d6429eea 100644 --- a/static/js/pad2.js +++ b/static/js/pad2.js @@ -79,12 +79,13 @@ function randomString() function getParams() { - var showControls = getUrlVars()["showControls"]; - var showChat = getUrlVars()["showChat"]; - var userName = unescape(getUrlVars()["userName"]); - var showLineNumbers = getUrlVars()["showLineNumbers"]; - var useMonospaceFont = getUrlVars()["useMonospaceFont"]; - var IsnoColors = getUrlVars()["noColors"]; + var params = getUrlVars() + var showControls = params["showControls"]; + var showChat = params["showChat"]; + var userName = params["userName"]; + var showLineNumbers = params["showLineNumbers"]; + var useMonospaceFont = params["useMonospaceFont"]; + var IsnoColors = params["noColors"]; if(IsnoColors) { @@ -130,7 +131,7 @@ function getParams() if(userName) { // If the username is set as a parameter we should set a global value that we can call once we have initiated the pad. - globalUserName = userName; + globalUserName = unescape(userName); } }