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

@vladmandic/pilogger

Package Overview
Dependencies
Maintainers
1
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vladmandic/pilogger - npm Package Compare versions

Comparing version 0.2.1 to 0.2.2

10

package.json
{
"name": "@vladmandic/pilogger",
"version": "0.2.1",
"version": "0.2.2",
"description": "Simple Logger for NodeJS",

@@ -34,9 +34,5 @@ "main": "pilogger.js",

"chalk": "^4.1.0",
"moment": "^2.27.0"
"dayjs": "^1.8.35"
},
"devDependencies": {
"eslint": "^7.7.0",
"eslint-config-airbnb-base": "^14.2.0",
"eslint-plugin-import": "^2.22.0"
}
"devDependencies": {}
}

@@ -5,3 +5,3 @@ const os = require('os');

const chalk = require('chalk');
const moment = require('moment');
const dayjs = require('dayjs');
const { Console } = require('console');

@@ -72,3 +72,3 @@

function print(...messages) {
const time = moment(Date.now()).format(dateFormat);
const time = dayjs(Date.now()).format(dateFormat);
logger.log(time, ...messages);

@@ -118,3 +118,3 @@ }

elapsed = Math.round(elapsed / 1000000).toLocaleString();
const time = moment(Date.now()).format(dateFormat);
const time = dayjs(Date.now()).format(dateFormat);
logger.log(time, tags.timed, `${elapsed} ms`, ...messages);

@@ -125,3 +125,3 @@ if (logFileOK) logStream.write(`${tags.timed} ${time} ${elapsed} ms ${combineMessages(...messages)}\n`);

async function log(tag, ...messages) {
const time = moment(Date.now()).format(dateFormat);
const time = dayjs(Date.now()).format(dateFormat);
print(tags[tag], ...messages);

@@ -134,3 +134,3 @@ if (logFileOK) logStream.write(`${time} ${tags[tag]} ${combineMessages(...messages)}\n`);

async function access(...messages) {
const time = moment(Date.now()).format(dateFormat);
const time = dayjs(Date.now()).format(dateFormat);
if (accessFileOK) accessStream.write(`${time} ${combineMessages(...messages)}\n`);

@@ -140,3 +140,3 @@ }

async function client(...messages) {
const time = moment(Date.now()).format(dateFormat);
const time = dayjs(Date.now()).format(dateFormat);
if (clientFileOK) clientStream.write(`${time} ${combineMessages(...messages)}\n`);

@@ -143,0 +143,0 @@ }

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