Comparing version 2.3.8 to 2.3.9
@@ -1,6 +0,8 @@ | ||
export declare const getMetaFromError: (e: Error) => { | ||
name: string; | ||
message: string; | ||
stack?: string | undefined; | ||
callstack: string | undefined; | ||
export declare const dumpError: (e: Error) => { | ||
error: { | ||
name: string; | ||
message: string; | ||
callstack: string | undefined; | ||
raw: string; | ||
}; | ||
}; |
'use strict' | ||
var __assign = | ||
(this && this.__assign) || | ||
function() { | ||
__assign = | ||
Object.assign || | ||
function(t) { | ||
for (var s, i = 1, n = arguments.length; i < n; i++) { | ||
s = arguments[i] | ||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p] | ||
} | ||
return t | ||
} | ||
return __assign.apply(this, arguments) | ||
Object.defineProperty(exports, '__esModule', { value: true }) | ||
exports.dumpError = function(e) { | ||
return { | ||
error: { | ||
name: e.name, | ||
message: e.message, | ||
callstack: e.stack, | ||
raw: JSON.stringify(e) | ||
} | ||
} | ||
Object.defineProperty(exports, '__esModule', { value: true }) | ||
exports.getMetaFromError = function(e) { | ||
return __assign({ message: e.message, callstack: e.stack }, e) | ||
} | ||
//# sourceMappingURL=error.js.map |
export { ILogger, ILoggerOptions, LogMethod, makeLogger, wipeSensitiveData } from './logger'; | ||
export { wrapLogger } from './wrap'; | ||
export { ILogger as IWrappedLogger, LogMethod as WrappedLogMethod } from './logger'; | ||
export { dumpError } from './error'; |
@@ -8,2 +8,4 @@ 'use strict' | ||
exports.wrapLogger = wrap_1.wrapLogger | ||
var error_1 = require('./error') | ||
exports.dumpError = error_1.dumpError | ||
//# sourceMappingURL=index.js.map |
@@ -41,5 +41,5 @@ 'use strict' | ||
if (msg instanceof Error) { | ||
logger[level](msg.name, error_1.getMetaFromError(msg)) | ||
logger[level](msg.name, __assign({}, meta, error_1.dumpError(msg))) | ||
} else if (meta instanceof Error) { | ||
logger[level](msg, error_1.getMetaFromError(meta)) | ||
logger[level](msg, error_1.dumpError(meta)) | ||
} else { | ||
@@ -46,0 +46,0 @@ logger[level](msg, meta) |
@@ -22,5 +22,5 @@ 'use strict' | ||
if (msg instanceof Error) { | ||
logger[level](msg.message, __assign({}, defaultMeta, error_1.getMetaFromError(msg))) | ||
logger[level](msg.message, __assign({}, defaultMeta, error_1.dumpError(msg))) | ||
} else if (meta instanceof Error) { | ||
logger[level](msg, __assign({}, defaultMeta, error_1.getMetaFromError(meta))) | ||
logger[level](msg, __assign({}, defaultMeta, error_1.dumpError(meta))) | ||
return wrappedLogger | ||
@@ -27,0 +27,0 @@ } else if (meta) { |
@@ -127,4 +127,8 @@ 'use strict' | ||
operation: { id: 'operation1' }, | ||
message: error.message, | ||
callstack: error.stack | ||
error: { | ||
message: error.message, | ||
callstack: error.stack, | ||
name: 'Error', | ||
raw: '{}' | ||
} | ||
}) | ||
@@ -142,4 +146,8 @@ }) | ||
operation: { id: 'operation1' }, | ||
message: error.message, | ||
callstack: error.stack | ||
error: { | ||
message: error.message, | ||
callstack: error.stack, | ||
name: 'Error', | ||
raw: '{}' | ||
} | ||
}) | ||
@@ -158,4 +166,8 @@ }) | ||
operation: { id: 'operation1' }, | ||
message: error1.message, | ||
callstack: error1.stack | ||
error: { | ||
message: error1.message, | ||
callstack: error1.stack, | ||
name: 'Error', | ||
raw: '{}' | ||
} | ||
}) | ||
@@ -179,4 +191,8 @@ }) | ||
operation_id: 'operation1', | ||
message: error.message, | ||
callstack: error.stack | ||
error: { | ||
message: error.message, | ||
callstack: error.stack, | ||
name: 'Error', | ||
raw: '{}' | ||
} | ||
}) | ||
@@ -198,4 +214,8 @@ }) | ||
operation_id: 'operation1', | ||
message: error.message, | ||
callstack: error.stack | ||
error: { | ||
message: error.message, | ||
callstack: error.stack, | ||
name: 'Error', | ||
raw: '{}' | ||
} | ||
}) | ||
@@ -218,4 +238,8 @@ }) | ||
operation_id: 'operation1', | ||
message: error1.message, | ||
callstack: error1.stack | ||
error: { | ||
message: error1.message, | ||
callstack: error1.stack, | ||
name: 'Error', | ||
raw: '{}' | ||
} | ||
}) | ||
@@ -222,0 +246,0 @@ }) |
{ | ||
"name": "loggerism", | ||
"version": "2.3.8", | ||
"version": "2.3.9", | ||
"description": "Yet another logger abstraction", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
29302
458