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

caterpillar

Package Overview
Dependencies
Maintainers
1
Versions
150
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

caterpillar - npm Package Compare versions

Comparing version 2.0.3 to 2.0.4

20

out/lib/caterpillar.js

@@ -1,2 +0,2 @@

// Generated by CoffeeScript 1.6.2
// Generated by CoffeeScript 1.6.3
var Logger, Transform, extendr, stream, _ref,

@@ -19,3 +19,4 @@ __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },

this._transform = __bind(this._transform, this);
this.setConfig = __bind(this.setConfig, this); this.config = extendr.deepClone(this.config);
this.setConfig = __bind(this.setConfig, this);
this.config = extendr.deepClone(this.config);
this.setConfig(opts);

@@ -44,3 +45,2 @@ Transform.__super__.constructor.apply(this, arguments);

var entry, message;
entry = JSON.parse(chunk.toString());

@@ -71,2 +71,3 @@ message = this.format(entry);

Logger.prototype.config = {
lineOffset: 0,
levels: {

@@ -96,3 +97,2 @@ emergency: 0,

var _ref1;
return (_ref1 = this.config.levels[name]) != null ? _ref1 : null;

@@ -103,3 +103,2 @@ };

var key, value, _ref1;
_ref1 = this.config.levels;

@@ -118,3 +117,2 @@ for (key in _ref1) {

var levelName, levelNumber, result;
result = {

@@ -144,4 +142,3 @@ levelNumber: null,

Logger.prototype.getLineInfo = function() {
var err, line, lines, parts, result, _i, _len, _ref1;
var err, line, lines, offset, parts, result, _i, _len, _ref1;
result = {

@@ -154,2 +151,3 @@ line: -1,

lines = ((_ref1 = err.stack) != null ? _ref1.split('\n') : void 0) || [];
offset = this.config.lineOffset;
for (_i = 0, _len = lines.length; _i < _len; _i++) {

@@ -160,2 +158,6 @@ line = lines[_i];

}
if (offset !== 0) {
--offset;
continue;
}
parts = line.split(':');

@@ -177,3 +179,2 @@ if (parts[0].indexOf('(') === -1) {

var args, entry, level, levelInfo, lineInfo;
level = arguments[0], args = 2 <= arguments.length ? __slice.call(arguments, 1) : [];

@@ -195,3 +196,2 @@ entry = {};

var args, entry, entryString;
args = 1 <= arguments.length ? __slice.call(arguments, 0) : [];

@@ -198,0 +198,0 @@ entry = this.format.apply(this, args);

{
"name": "caterpillar",
"version": "2.0.3",
"version": "2.0.4",
"description": "Caterpillar is the ultimate logging system for Node.js, based on transform streams you can log to it and pipe the output off to different locations, including some pre-made ones. Caterpillar also supports log levels according to the RFC standard, as well as line, method, and file fetching for messages. You can even use it in web browsers with caterpillar-browser.",

@@ -29,3 +29,3 @@ "homepage": "https://github.com/bevry/caterpillar",

"dependencies": {
"extendr": "~2.0.1",
"extendr": "~2.1.0",
"readable-stream": "~1.0.2"

@@ -39,3 +39,3 @@ },

"joe-reporter-console": "~1.2.1",
"chai": "~1.5.0"
"chai": "~1.7.2"
},

@@ -42,0 +42,0 @@ "directories": {

@@ -26,3 +26,3 @@ # Caterpillar

### Example with the [Filter](https://github.com/bevry/caterpillar-filter) and [Human](https://github.com/bevry/caterpillar-filter) transforms
### Example with the [Filter](https://github.com/bevry/caterpillar-filter) and [Human](https://github.com/bevry/caterpillar-human) transforms

@@ -120,2 +120,3 @@ ``` javascript

- Configuration
- `lineOffset` the amount of lines to offset when doing our line detection, useful for wrappers, defaults to `0`
- `levels` the level names and their associated number, also includes `default` for when no level was specified, defaults to:

@@ -122,0 +123,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