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

logtown-bunyan

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

logtown-bunyan - npm Package Compare versions

Comparing version 1.0.1 to 2.2.0

131

es5/index.js
'use strict';
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) {
throw new TypeError("Cannot call a class as a function");
}
}
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || false;
descriptor.configurable = true;
if ("value" in descriptor) descriptor.writable = true;
Object.defineProperty(target, descriptor.key, descriptor);
}
}
function _createClass(Constructor, protoProps, staticProps) {
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
if (staticProps) _defineProperties(Constructor, staticProps);
return Constructor;
}
function _defineProperty(obj, key, value) {
if (key in obj) {
Object.defineProperty(obj, key, {
value: value,
enumerable: true,
configurable: true,
writable: true
});
} else {
obj[key] = value;
}
return obj;
}
function _objectSpread(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i] != null ? arguments[i] : {};
var ownKeys = Object.keys(source);
if (typeof Object.getOwnPropertySymbols === 'function') {
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
}));
}
ownKeys.forEach(function (key) {
_defineProperty(target, key, source[key]);
});
}
return target;
}
var bunyan = require('bunyan');
/**

@@ -13,3 +64,6 @@ * Logtown wrapper for bunyan logger

var Bunyan = function () {
var Bunyan =
/*#__PURE__*/
function () {
/**

@@ -23,11 +77,11 @@ * @param {string} name

_ref$level = _ref.level,
level = _ref$level === undefined ? 'trace' : _ref$level,
level = _ref$level === void 0 ? 'trace' : _ref$level,
_ref$stream = _ref.stream,
stream = _ref$stream === undefined ? null : _ref$stream,
stream = _ref$stream === void 0 ? process.stdout : _ref$stream,
_ref$streams = _ref.streams,
streams = _ref$streams === undefined ? [] : _ref$streams,
streams = _ref$streams === void 0 ? [] : _ref$streams,
_ref$serializers = _ref.serializers,
serializers = _ref$serializers === undefined ? null : _ref$serializers,
serializers = _ref$serializers === void 0 ? null : _ref$serializers,
_ref$src = _ref.src,
src = _ref$src === undefined ? false : _ref$src;
src = _ref$src === void 0 ? false : _ref$src;

@@ -38,3 +92,3 @@ var values = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};

this._logger = bunyan.createLogger(Object.assign({
var options = _objectSpread({
name: name,

@@ -46,5 +100,12 @@ level: level,

src: src
}, values));
}, values);
if (streams.length) {
delete options.stream;
} else {
delete options.streams;
}
this._logger = bunyan.createLogger(options);
}
/**

@@ -58,13 +119,12 @@ * @param {string} id

_createClass(Bunyan, [{
key: 'silly',
key: "silly",
value: function silly(id, stats) {
var _logger;
var _this$_logger;
for (var _len = arguments.length, rest = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
for (var _len = arguments.length, rest = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
rest[_key - 2] = arguments[_key];
}
(_logger = this._logger).trace.apply(_logger, rest);
(_this$_logger = this._logger).trace.apply(_this$_logger, rest);
}
/**

@@ -77,13 +137,12 @@ * @param {string} id

}, {
key: 'debug',
key: "debug",
value: function debug(id, stats) {
var _logger2;
var _this$_logger2;
for (var _len2 = arguments.length, rest = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
for (var _len2 = arguments.length, rest = new Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
rest[_key2 - 2] = arguments[_key2];
}
(_logger2 = this._logger).debug.apply(_logger2, rest);
(_this$_logger2 = this._logger).debug.apply(_this$_logger2, rest);
}
/**

@@ -96,13 +155,12 @@ * @param {string} id

}, {
key: 'info',
key: "info",
value: function info(id, stats) {
var _logger3;
var _this$_logger3;
for (var _len3 = arguments.length, rest = Array(_len3 > 2 ? _len3 - 2 : 0), _key3 = 2; _key3 < _len3; _key3++) {
for (var _len3 = arguments.length, rest = new Array(_len3 > 2 ? _len3 - 2 : 0), _key3 = 2; _key3 < _len3; _key3++) {
rest[_key3 - 2] = arguments[_key3];
}
(_logger3 = this._logger).info.apply(_logger3, rest);
(_this$_logger3 = this._logger).info.apply(_this$_logger3, rest);
}
/**

@@ -115,13 +173,12 @@ * @param {string} id

}, {
key: 'warn',
key: "warn",
value: function warn(id, stats) {
var _logger4;
var _this$_logger4;
for (var _len4 = arguments.length, rest = Array(_len4 > 2 ? _len4 - 2 : 0), _key4 = 2; _key4 < _len4; _key4++) {
for (var _len4 = arguments.length, rest = new Array(_len4 > 2 ? _len4 - 2 : 0), _key4 = 2; _key4 < _len4; _key4++) {
rest[_key4 - 2] = arguments[_key4];
}
(_logger4 = this._logger).warn.apply(_logger4, rest);
(_this$_logger4 = this._logger).warn.apply(_this$_logger4, rest);
}
/**

@@ -134,11 +191,11 @@ * @param {string} id

}, {
key: 'error',
key: "error",
value: function error(id, stats) {
var _logger5;
var _this$_logger5;
for (var _len5 = arguments.length, rest = Array(_len5 > 2 ? _len5 - 2 : 0), _key5 = 2; _key5 < _len5; _key5++) {
for (var _len5 = arguments.length, rest = new Array(_len5 > 2 ? _len5 - 2 : 0), _key5 = 2; _key5 < _len5; _key5++) {
rest[_key5 - 2] = arguments[_key5];
}
(_logger5 = this._logger).error.apply(_logger5, rest);
(_this$_logger5 = this._logger).error.apply(_this$_logger5, rest);
}

@@ -150,2 +207,2 @@ }]);

module.export = Bunyan;
module.exports = Bunyan;

@@ -14,12 +14,18 @@ 'use strict';

*/
constructor(name, {level = 'trace', stream = null, streams = [], serializers = null, src = false} = {}, values = {}) {
this._logger = bunyan.createLogger(Object.assign({
name,
level,
stream,
streams,
serializers,
src
}, values
));
constructor(name, { level = 'trace', stream = process.stdout, streams = [], serializers = null, src = false } = {}, values = {}) {
const options = {
name,
level,
stream,
streams,
serializers,
src,
...values
};
if (streams.length) {
delete options.stream;
} else {
delete options.streams;
}
this._logger = bunyan.createLogger(options);
}

@@ -26,0 +32,0 @@

{
"name": "logtown-bunyan",
"version": "1.0.1",
"version": "2.2.0",
"description": "Logtown wrapper for bunyan logger",
"main": "index.js",
"main": "es5/index.js",
"module": "index.js",
"scripts": {
"test": "npm run make && ava --verbose",
"test": "tape test/**/*.js",
"es5-commonjs": "rollup --config rollup.config.cjs.es5.js",

@@ -20,16 +21,29 @@ "build": "npm run es5-commonjs"

"type": "git",
"url": "https://github.com/logtown/logtown-bunyan"
"url": "https://github.com/logtown/logtown"
},
"author": "Dmitry Zelenetskiy <dmitry.zelenetskiy@gmail.com>",
"author": "Dmytro Zelenetskyi <dmytro.zelenetskyi@gmail.com>",
"license": "MIT",
"bugs": {
"url": "https://github.com/logtown/logtown-bunyan/issues"
"url": "https://github.com/logtown/logtown/issues"
},
"homepage": "https://github.com/logtown/logtown-bunyan",
"homepage": "https://github.com/logtown/logtown/tree/master/wrappers/bunyan",
"devDependencies": {
"babel-plugin-external-helpers": "^6.18.0",
"babel-preset-es2015": "^6.18.0",
"rollup": "^0.39.2",
"rollup-plugin-babel": "^2.7.1"
}
"@babel/core": "^7.0.0-beta.55",
"@babel/plugin-external-helpers": "^7.0.0-beta.55",
"@babel/preset-env": "^7.0.0-beta.55",
"bunyan": "^1.8.12",
"logtown": "^2.2.0",
"rollup": "^0.63.4",
"rollup-plugin-babel": "^4.0.0-beta.7",
"std-mocks": "^1.0.1",
"tape": "^4.9.1"
},
"peerDependencies": {
"bunyan": "^1.8.12",
"logtown": "*"
},
"publishConfig": {
"access": "public"
},
"gitHead": "e2aa3150426a13d9db1128110ba39d068d285b72"
}
'use strict';
import babel from 'rollup-plugin-babel';
const babel = require('rollup-plugin-babel');
export default {
entry: './index.js',
dest: './es5/index.js',
format: 'cjs',
input: './index.js',
output: {
file: './es5/index.js',
format: 'cjs',
interop: false
},
external: [
'bunyan'
],
interop: false,
plugins: [
babel({
presets: [
['es2015', { modules: false }]
['@babel/preset-env', {
'targets': {
'browsers': ['last 2 versions', 'safari >= 7']
},
'modules': false
}]
]

@@ -18,0 +25,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