From 8223f8471477cc3bf86f164095f1097b9893d6ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Fr=C3=B6ssman?= Date: Mon, 17 Oct 2011 23:31:39 +0200 Subject: [PATCH 1/5] Kind of a hack but makes issue #158 go away. There is probably a deeper error somewhere in either log4js or express, I don't have the time to investigate that atm. --- node/server.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/node/server.js b/node/server.js index 2bebe6a2..fbaf08e5 100644 --- a/node/server.js +++ b/node/server.js @@ -91,7 +91,8 @@ async.waterfall([ var httpLogger = log4js.getLogger("http"); app.configure(function() { - app.use(log4js.connectLogger(httpLogger, { level: log4js.levels.INFO, format: ':status, :method :url'})); + if (!(settings.loglevel === "WARN" || settings.loglevel == "ERROR")) + app.use(log4js.connectLogger(httpLogger, { level: log4js.levels.INFO, format: ':status, :method :url'})); app.use(express.cookieParser()); }); From 73711abd97aced9bc6c12d1e013d29d5e4315672 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Fr=C3=B6ssman?= Date: Thu, 3 Nov 2011 07:34:51 +0100 Subject: [PATCH 2/5] Added comments --- node/server.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/node/server.js b/node/server.js index fbaf08e5..57609ac8 100644 --- a/node/server.js +++ b/node/server.js @@ -91,6 +91,8 @@ async.waterfall([ var httpLogger = log4js.getLogger("http"); app.configure(function() { + // 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()); From ce4d9df665146045dab8b20abd62e5ca68a6a8aa Mon Sep 17 00:00:00 2001 From: andrehjr Date: Tue, 15 Nov 2011 21:33:43 -0200 Subject: [PATCH 3/5] Fix issue #182: Pad forgets usernames --- static/js/pad2.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/static/js/pad2.js b/static/js/pad2.js index 9df57ae8..394eb4c7 100644 --- a/static/js/pad2.js +++ b/static/js/pad2.js @@ -81,7 +81,7 @@ function getParams() { var showControls = getUrlVars()["showControls"]; var showChat = getUrlVars()["showChat"]; - var userName = unescape(getUrlVars()["userName"]); + var userName = getUrlVars()["userName"]; var showLineNumbers = getUrlVars()["showLineNumbers"]; var useMonospaceFont = getUrlVars()["useMonospaceFont"]; var IsnoColors = getUrlVars()["noColors"]; @@ -130,7 +130,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); } } From 8e7e74170e480a5ceebade3ee3e23347043171ae Mon Sep 17 00:00:00 2001 From: andrehjr Date: Tue, 15 Nov 2011 21:36:26 -0200 Subject: [PATCH 4/5] Extract getUrlVars() function calls to a local var --- static/js/pad2.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/static/js/pad2.js b/static/js/pad2.js index 394eb4c7..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 = 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) { From 73629921919d1775d9a0d8569e64504bce0d3e5f Mon Sep 17 00:00:00 2001 From: John Soros Date: Fri, 18 Nov 2011 03:49:00 +0100 Subject: [PATCH 5/5] Update README.md and settings.json.template: use mysql or sqlite for production --- README.md | 2 ++ settings.json.template | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 785a0835..e73b5e48 100644 --- a/README.md +++ b/README.md @@ -74,6 +74,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/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" : {