Comparing version 1.0.3 to 1.0.4
22
log.js
const chalk = require('chalk'); | ||
const moment = require('moment'); | ||
// #### logging decoration #### | ||
// see https://github.com/kutuluk/loglevel-plugin-prefix | ||
/*const colors = { | ||
TRACE: chalk.magenta, | ||
DEBUG: chalk.cyan, | ||
INFO: chalk.blue, | ||
WARN: chalk.yellow, | ||
ERROR: chalk.red, | ||
};*/ | ||
const WRITE_LOG = true; | ||
const winston = require("winston"); | ||
const { format } = require('logform'); | ||
const { createLogger, format, transports } = require("winston"); | ||
const DailyRotateFile = require('winston-daily-rotate-file'); | ||
const transportConsole = new winston.transports.Console(); | ||
const transportFileError = new winston.transports.File({ filename: 'log/error.log', level: 'error' }); | ||
const transportConsole = new transports.Console(); | ||
const transportFileError = new transports.File({ filename: 'log/error.log', level: 'error' }); | ||
const transportFileRegular = new DailyRotateFile({ filename: 'log/%DATE%', datePattern: 'MM-DD' }); | ||
@@ -39,3 +25,3 @@ | ||
const logger = winston.createLogger({ | ||
const logger = createLogger({ | ||
level: 'debug', | ||
@@ -42,0 +28,0 @@ format: alignedWithColorsAndTime, |
{ | ||
"name": "abr-log", | ||
"version": "1.0.3", | ||
"description": "Log helper", | ||
"version": "1.0.4", | ||
"description": "", | ||
"main": "log.js", | ||
@@ -12,8 +12,7 @@ "scripts": { | ||
"dependencies": { | ||
"chalk": "^2.4.2", | ||
"logform": "^1.10.0", | ||
"moment": "^2.24.0", | ||
"winston": "^3.2.1", | ||
"winston-daily-rotate-file": "^3.9.0" | ||
} | ||
"chalk": "^2.3.2", | ||
"winston": "^3.8.1", | ||
"winston-daily-rotate-file": "^4.7.1" | ||
}, | ||
"homepage": "https://github.com/adblockradio/log" | ||
} |
@@ -8,3 +8,3 @@ # log helper | ||
## Installation | ||
Add the line `"abr-log": "git+https://git@github.com/dest4/log.git",` to your package.json. Then `npm install`. | ||
`npm install abr-log --save` | ||
@@ -11,0 +11,0 @@ ## Usage |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
3
1
3756
5
41
+ Addedfile-stream-rotator@0.6.1(transitive)
+ Addedobject-hash@2.2.0(transitive)
+ Addedwinston-daily-rotate-file@4.7.1(transitive)
- Removedlogform@^1.10.0
- Removedmoment@^2.24.0
- Removedcolors@1.4.0(transitive)
- Removedcycle@1.0.3(transitive)
- Removedfast-safe-stringify@2.1.1(transitive)
- Removedfecha@2.3.3(transitive)
- Removedfile-stream-rotator@0.4.1(transitive)
- Removedlogform@1.10.0(transitive)
- Removedobject-hash@1.3.1(transitive)
- Removedsemver@6.3.1(transitive)
- Removedwinston-compat@0.1.5(transitive)
- Removedwinston-daily-rotate-file@3.10.0(transitive)
Updatedchalk@^2.3.2
Updatedwinston@^3.8.1