Comparing version 0.2.5 to 0.2.6
12
index.js
@@ -208,2 +208,14 @@ var fs = require('fs'), | ||
this.params['isNative'] = ''; | ||
// 如果没有传msg,但是传了stack,则用stack信息替代msg | ||
if (option['stack']) { | ||
try { | ||
if (!option['msg']) { | ||
this.params['error_msg'] = this.opts['debug'] | ||
? option['stack'] | ||
: String(option['stack']).replace(/(\n)+|(\r\n)+/g, ' '); | ||
} | ||
} catch (e) { | ||
//this.log('notice','wrong error obj'); | ||
} | ||
} | ||
}, | ||
@@ -210,0 +222,0 @@ |
{ | ||
"name": "yog-log", | ||
"version": "0.2.5", | ||
"version": "0.2.6", | ||
"description": "yog logger", | ||
@@ -19,3 +19,3 @@ "main": "index.js", | ||
}, | ||
"devDependencies": { | ||
"devDependencies": { | ||
"express": "4.17.1" | ||
@@ -22,0 +22,0 @@ }, |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
74837
1331
2