Socket
Socket
Sign inDemoInstall

webpack-log

Package Overview
Dependencies
34
Maintainers
3
Versions
11
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.2 to 1.1.0

18

index.js

@@ -6,2 +6,3 @@ 'use strict';

const logSymbols = require('log-symbols');
const uuid = require('uuid/v4');

@@ -22,3 +23,4 @@ const symbols = {

template: `{{level}} ${chalk.gray('「{{name}}」')}: `
}
},
unique: true
};

@@ -29,2 +31,8 @@

Object.defineProperty(opts, 'id', {
get() {
return this.name + (opts.unique ? `-${uuid()}` : '');
}
});
if (opts.timestamp) {

@@ -36,2 +44,10 @@ opts.prefix.template = `[{{time}}] ${opts.prefix.template}`;

if (!Object.prototype.hasOwnProperty.call(log, 'id')) {
Object.defineProperty(log, 'id', {
get() {
return opts.id;
}
});
}
return log;

@@ -38,0 +54,0 @@ };

5

package.json
{
"name": "webpack-log",
"version": "1.0.2",
"version": "1.1.0",
"description": "A common logging module for the Webpack ecosystem",

@@ -34,3 +34,4 @@ "license": "MIT",

"log-symbols": "^2.1.0",
"loglevelnext": "^1.0.0"
"loglevelnext": "^1.0.1",
"uuid": "^3.1.0"
},

@@ -37,0 +38,0 @@ "devDependencies": {

@@ -48,5 +48,9 @@ <div align="center">

The default export (`function`) accepts an `options` Object. The following is a property reference
for the Object.
The default export (`function`) will return a logger, given an `options` Object.
The following is a property reference for the Object.
_Note: the logger returned is unique by default, due to the nature of the `webpack`
ecosystem. Please reference the [`unique`](#unique) option below for disabling
this feature and to force caching._
### level

@@ -92,2 +96,13 @@

### unique
Type: `Boolean`
Default: `true`
If `false`, instructs the logger to used cached versions of a log with the same
name. Due to the nature of the `webpack` ecosystem and multiple plugin/loader
use in the same process space, loggers are created as unique instances by default.
By passing `false` for this property, the module is instructed to cache the
requested logger.
## Contributing

@@ -94,0 +109,0 @@

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc