added mozlog and file exists route

This commit is contained in:
Abhinav Adduri 2017-06-08 13:45:28 -07:00
parent f9c2eb1ae4
commit 900fe32460
9 changed files with 127 additions and 49 deletions

15
server/log.js Normal file
View file

@ -0,0 +1,15 @@
const conf = require('./config.js');
let notLocalHost =
conf.env === 'production' &&
conf.s3_bucket !== 'localhost' &&
conf.bitly_key !== 'localhost';
const mozlog = require('mozlog') ({
app: 'FirefoxFileshare',
level: notLocalHost ? 'INFO' : 'verbose',
fmt: notLocalHost ? 'heka' : 'pretty',
debug: !notLocalHost
})
module.exports = mozlog;