UNPKG

spacy-nlp

Version:

Expose Spacy nlp text parsing to Nodejs (and other languages) via socketIO

23 lines (20 loc) 547 B
const winston = require("winston"); /* istanbul ignore next */ logLevel = process.env["npm_config_debug"] ? "debug" : "info"; const log = global.log || new winston.Logger({ level: logLevel, transports: [ new winston.transports.Console({ formatter: options => { /* istanbul ignore next */ return `[${new Date()}] ${winston.config.colorize( options.level, options.level.toUpperCase() )} ${options.message || ""}`; } }) ] }); module.exports = log;