Skip to content

Loading…

loggin! #104

Merged
merged 1 commit into from

1 participant

@Pomax

because seriously, what?

@Pomax Pomax merged commit ec3f810 into mozilla:master

1 check passed

Details default The Travis CI build passed
@Pomax Pomax deleted the Pomax:logging branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 3, 2014
  1. @Pomax

    loggin\!

    Pomax committed
This page is out of date. Refresh to see the latest.
Showing with 11 additions and 0 deletions.
  1. +10 −0 app.js
  2. +1 −0 package.json
View
10 app.js
@@ -43,6 +43,16 @@ nunjucksEnv.express(app);
app.disable("x-powered-by");
+// log either to GELF or console
+if (env.get("ENABLE_GELF_LOGS")) {
+ messina = require("messina");
+ logger = messina("goggles.webmaker.org-" + env.get("NODE_ENV") || "development" );
+ logger.init();
+ app.use(logger.middleware());
+} else {
+ app.use(express.logger("dev"));
+}
+
// Setup locales with i18n
app.use( i18n.middleware({
supported_languages: env.get("SUPPORTED_LANGS"),
View
1 package.json
@@ -18,6 +18,7 @@
"node-webmaker-i18n": "https://github.com/mozilla/node-webmaker-i18n/archive/v0.3.11.tar.gz",
"knox": "0.8.5",
"makeapi-client": "https://github.com/mozilla/makeapi-client/tarball/v0.5.16",
+ "messina": "0.1.2",
"mox-server": "https://github.com/Pomax/mox-server/archive/master.tar.gz",
"newrelic": "1.3.2",
"node-statsd": "0.0.7",
Something went wrong with that request. Please try again.