0.0.3 • Published 11 months ago
winston-log-lite v0.0.3
Compile source
npm run-script compile
# Generate dist
directory
Use
Prerequisite
npm install --save winston
npm install --save winston-daily-rotate-file
Install
npm install --save winston-log-lite
Use in code
Like function of winston
package
const log = require('winston-log-lite')(module)
log.info('')
log.debug('')
log.warn('')
log.error('')
Priority: const levels = { error: 0, warn: 1, info: 2, http: 3, verbose: 4, debug: 5,silly: 6}
Enviroment variable
npm install --save dotenv
Create file .env
with NODE_ENV=production (or development)
Set process.env.NODE_PATH=module.path
in first of file main like app.js
or main.js
or index.js
for get root path of projects