overleaf/libraries/logger/logging-manager.coffee

21 lines
481 B
CoffeeScript
Raw Normal View History

2014-02-17 09:54:20 -05:00
bunyan = require('bunyan')
module.exports = Logger =
initialize: (name) ->
@logger = bunyan.createLogger
name: name
serializers: bunyan.stdSerializers
return @
info : ()->
@logger.info.apply(@logger, arguments)
log : ()->
@logger.info.apply(@logger, arguments)
error: ()->
@logger.error.apply(@logger, arguments)
err: ()->
@logger.error.apply(@logger, arguments)
warn: ()->
@logger.warn.apply(@logger, arguments)
Logger.initialize("default-sharelatex")