initial commit

This commit is contained in:
Blue 2018-08-05 00:46:25 +03:00 committed by Юрий Губич
commit 4b60ece582
327 changed files with 28286 additions and 0 deletions

18
magnus/lib/log.js Normal file
View file

@ -0,0 +1,18 @@
var Winston = require("winston");
var config = require("../config");
var ENV = config.get('build');
function getLogger(module) {
var path = module.filename.split('/').slice(-2).join('/');
return new Winston.Logger({
transports: [
new Winston.transports.Console({
colorize: true,
level: ENV == 'debug' ? 'debug' : 'error'
})
]
});
}
module.exports = getLogger;