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

logplease

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

logplease - npm Package Compare versions

Comparing version 1.2.5 to 1.2.6

circle.yml

2

package.json
{
"name": "logplease",
"version": "1.2.5",
"version": "1.2.6",
"description": "Simple Javascript logger for Node.js and Browsers",

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

@@ -0,1 +1,3 @@

'use strict';
module.exports = {

@@ -2,0 +4,0 @@ createWriteStream: function(filename, options) {

'use strict';
const fs = require('fs');
const format = require('util').format;

@@ -71,20 +72,20 @@ let isNodejs = process.version ? true : false;

debug(text) {
this._write(LogLevels.DEBUG, text);
debug() {
this._write(LogLevels.DEBUG, format.apply(null, arguments));
}
log(text) {
this.debug(text);
log() {
this.debug.apply(this, arguments);
}
info(text) {
this._write(LogLevels.INFO, text);
info() {
this._write(LogLevels.INFO, format.apply(null, arguments));
}
warn(text) {
this._write(LogLevels.WARN, text);
warn() {
this._write(LogLevels.WARN, format.apply(null, arguments));
}
error(text) {
this._write(LogLevels.ERROR, text);
error() {
this._write(LogLevels.ERROR, format.apply(null, arguments));
}

@@ -91,0 +92,0 @@

@@ -254,2 +254,14 @@ 'use strict';

});
it('formats strings using %d, %s', (done) => {
let out = '';
let old = console.log;
console.log = (d) => out += d;
const log = Logger.create('test1234', { useColors: false });
log.debug('hi %d %s', 314, 'THISISASTRING');
console.log = old;
let result = out.split(' ').slice(3).join(' ');
assert.equal(result, 'hi 314 THISISASTRING');
done();
});
});

@@ -256,0 +268,0 @@

Sorry, the diff of this file is not supported yet

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