mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-25 01:40:49 +00:00
lower case prod check, bump version
This commit is contained in:
parent
8764c7378b
commit
128c9f7c39
2 changed files with 4 additions and 3 deletions
|
@ -3,13 +3,14 @@ request = require('request')
|
|||
|
||||
module.exports = Logger =
|
||||
initialize: (name) ->
|
||||
@defaultLevel = process.env['LOG_LEVEL'] or if process.env["NODE_ENV"] == 'production' then "warn" else "debug"
|
||||
isProduction = process.env['NODE_ENV']?.toLowerCase() == 'production'
|
||||
@defaultLevel = process.env['LOG_LEVEL'] or if isProduction then "warn" else "debug"
|
||||
@loggerName = name
|
||||
@logger = bunyan.createLogger
|
||||
name: name
|
||||
serializers: bunyan.stdSerializers
|
||||
level: @defaultLevel
|
||||
if process.env["NODE_ENV"] == 'production'
|
||||
if isProduction
|
||||
# check for log level override on startup
|
||||
@.checkLogLevel()
|
||||
# re-check log level every minute
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
"type": "git",
|
||||
"url": "http://github.com/sharelatex/logger-sharelatex.git"
|
||||
},
|
||||
"version": "1.5.9",
|
||||
"version": "1.6.0",
|
||||
"scripts": {
|
||||
"test": "mocha --require coffee-script/register test/**/*.coffee"
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue