Merge pull request #8 from sharelatex/ho-log-levels

add process.env['LOG_LEVEL'] varable to let us change the logging level
This commit is contained in:
Henry Oswald 2018-12-21 11:04:27 +00:00 committed by GitHub
commit 6c3a28d963
2 changed files with 3 additions and 1 deletions

View file

@ -2,9 +2,11 @@ bunyan = require('bunyan')
module.exports = Logger =
initialize: (name) ->
level = process.env['LOG_LEVEL'] or "debug"
@logger = bunyan.createLogger
name: name
serializers: bunyan.stdSerializers
level: level
return @
initializeErrorReporting: (sentry_dsn, options) ->

View file

@ -6,7 +6,7 @@
"type": "git",
"url": "http://github.com/sharelatex/logger-sharelatex.git"
},
"version": "1.5.8",
"version": "1.5.9",
"dependencies": {
"bunyan": "1.5.1",
"chai": "",