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

debug-logtron

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

debug-logtron - npm Package Compare versions

Comparing version 2.0.2 to 2.1.0

4

index.js

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

proto.access = function access(msg, meta, cb) {
this._log(LEVELS.access, msg, meta, cb);
};
proto.warn = function warn(msg, meta, cb) {

@@ -74,0 +78,0 @@ this._log(LEVELS.warn, msg, meta, cb);

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

'info': 30,
'access': 35,
'warn': 40,

@@ -17,2 +18,3 @@ 'error': 50,

'30': 'info',
'35': 'access',
'40': 'warn',

@@ -19,0 +21,0 @@ '50': 'error',

2

package.json
{
"name": "debug-logtron",
"version": "2.0.2",
"version": "2.1.0",
"description": "A debug logger with a logtron interface.",

@@ -5,0 +5,0 @@ "keywords": [],

@@ -29,2 +29,9 @@ # debug-logtron

`debug-logtron` will internally use [`debuglog`][debuglog] to
write your logs.
This means its silent by default unless you start the process
with the `NODE_DEBUG` environment variable. If you set
`NODE_DEBUG=mylibrary` it will write to stderr.
## Alternatives

@@ -80,1 +87,2 @@

[null-logtron]: https://github.com/Raynos/null-logtron
[debuglog]: https://github.com/sam-github/node-debuglog

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

logger.info('info');
logger.access('access');
logger.warn('warn');

@@ -64,3 +65,3 @@ logger.error('error');

assert.equal(logger.lines.length, 6);
assert.equal(logger.lines.length, 7);

@@ -81,12 +82,16 @@ var line = logger.lines[0];

assert.equal(line4.namespace, 'debuglogtron');
assert.equal(line4.msg, 'warn: warn ~ null');
assert.equal(line4.msg, 'access: access ~ null');
var line5 = logger.lines[4];
assert.equal(line5.namespace, 'debuglogtron');
assert.equal(line5.msg, 'error: error ~ null');
assert.equal(line5.msg, 'warn: warn ~ null');
var line6 = logger.lines[5];
assert.equal(line6.namespace, 'debuglogtron');
assert.equal(line6.msg, 'fatal: fatal ~ null');
assert.equal(line6.msg, 'error: error ~ null');
var line7 = logger.lines[6];
assert.equal(line7.namespace, 'debuglogtron');
assert.equal(line7.msg, 'fatal: fatal ~ null');
assert.end();

@@ -93,0 +98,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