mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-23 09:09:36 +02:00
Initial open source commit
This commit is contained in:
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"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user