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

plylog

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

plylog - npm Package Compare versions

Comparing version 0.1.0 to 0.2.0

12

index.js

@@ -33,2 +33,3 @@ /**

});
this._logger = new (winston.Logger)({transports: [consoleTransport]});

@@ -39,2 +40,11 @@ this._logger.cli();

/**
* Read the instance's level from our internal logger.
*
* @return {string}
*/
get level() {
return this._logger.transports.console.level;
}
/**
* Sets a new logger level on the internal winston logger. The level dictates

@@ -46,3 +56,3 @@ * the minimum level severity that you will log to the console.

*/
setLevel(newLevel) {
set level(newLevel) {
this._logger.transports.console.level = newLevel;

@@ -49,0 +59,0 @@ }

2

package.json
{
"name": "plylog",
"version": "0.1.0",
"version": "0.2.0",
"description": "A logger for the Polymer CLI toolchain",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -51,10 +51,17 @@ /**

test('changes its internal logger\'s level when setLevel() is called', () => {
test('changes its internal logger\'s level when level property is changed', () => {
let logger = logging.getLogger('TEST_LOGGER');
logger.setLevel('info');
logger.level = 'info';
assert.equal(logger._logger.transports.console.level, 'info');
logger.setLevel('debug');
logger.level = 'debug';
assert.equal(logger._logger.transports.console.level, 'debug');
});
test('reads its internal logger\'s level when the level property is read', () => {
let logger = logging.getLogger('TEST_LOGGER');
logger.level = 'silly';
assert.equal(logger._logger.transports.console.level, 'silly');
assert.equal(logger.level, 'silly');
});
test('loggers properly pass arguments to their internal logger\'s log methods when called', () => {

@@ -61,0 +68,0 @@ let logger = logging.getLogger('TEST_LOGGER');

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