Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

abr-log

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

abr-log - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4

demo.js

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc