mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-14 20:40:17 -05:00
Initial open source commit
This commit is contained in:
commit
58cd9ced1a
4 changed files with 32 additions and 0 deletions
1
libraries/logger/.gitignore
vendored
Normal file
1
libraries/logger/.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
node_modules
|
2
libraries/logger/index.js
Executable file
2
libraries/logger/index.js
Executable file
|
@ -0,0 +1,2 @@
|
|||
require("coffee-script")
|
||||
module.exports = require('./logging-manager');
|
20
libraries/logger/logging-manager.coffee
Normal file
20
libraries/logger/logging-manager.coffee
Normal file
|
@ -0,0 +1,20 @@
|
|||
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")
|
9
libraries/logger/package.json
Normal file
9
libraries/logger/package.json
Normal file
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"name": "logger-sharelatex",
|
||||
"homepage": "www.sharelatex.com",
|
||||
"version": "0.0.1",
|
||||
"dependencies": {
|
||||
"coffee-script": "1.4.0",
|
||||
"bunyan": "0.16.x"
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue