for #55: MOZLOG_FMT for formatting
This commit is contained in:
Родитель
9151cd851b
Коммит
981af8d14c
|
@ -5,7 +5,9 @@ PORT=6060
|
|||
COOKIE_SECRET=3895d33b5f9730f5eb2a2067fe0a690e298f55f5e382c032fd3656863412
|
||||
|
||||
# see https://www.npmjs.com/package/mozlog
|
||||
MOZLOG_LEVEL=debug
|
||||
# default values are for dev/debug
|
||||
MOZLOG_FMT="pretty"
|
||||
MOZLOG_LEVEL="debug"
|
||||
|
||||
# 1: disables the dockerflow endpoints
|
||||
# see: https://github.com/mozilla-services/Dockerflow#containerized-app-requirements
|
||||
|
|
|
@ -19,6 +19,7 @@ const kEnvironmentVariables = [
|
|||
"BASKET_API_KEY",
|
||||
"BASKET_NEWSLETTER",
|
||||
"FXA_ENABLED",
|
||||
"MOZLOG_FMT",
|
||||
"MOZLOG_LEVEL",
|
||||
"OAUTH_AUTHORIZATION_URI",
|
||||
"OAUTH_TOKEN_URI",
|
||||
|
|
2
hibp.js
2
hibp.js
|
@ -65,7 +65,7 @@ const HIBP = {
|
|||
},
|
||||
|
||||
async loadBreachesIntoApp(app) {
|
||||
log.info("loadBreachesIntoApp", {});
|
||||
log.info("loadBreachesIntoApp");
|
||||
try {
|
||||
const breachesResponse = await this.req("/breaches");
|
||||
const breaches = [];
|
||||
|
|
1
log.js
1
log.js
|
@ -8,6 +8,7 @@ const AppConstants = require("./app-constants");
|
|||
const log = mozlog({
|
||||
app: "fx-monitor",
|
||||
level: AppConstants.MOZLOG_LEVEL,
|
||||
fmt: AppConstants.MOZLOG_FMT,
|
||||
});
|
||||
|
||||
|
||||
|
|
|
@ -116,7 +116,7 @@ app.use(errorHandler);
|
|||
|
||||
EmailUtils.init().then(() => {
|
||||
const listener = app.listen(AppConstants.PORT, () => {
|
||||
log.info("Listening", {port: listener.address().port});
|
||||
log.info("Listening", { port: listener.address().port });
|
||||
});
|
||||
}).catch(error => {
|
||||
log.error(error);
|
||||
|
|
Загрузка…
Ссылка в новой задаче