@commercetools/sdk-middleware-logger
Advanced tools
Comparing version 1.0.7 to 2.0.0
@@ -5,4 +5,2 @@ 'use strict'; | ||
/* */ | ||
function createLoggerMiddleware() { | ||
@@ -17,4 +15,9 @@ return function (next) { | ||
console.log('Request: ', request); | ||
console.log('Response: ', { error: error, body: body, statusCode: statusCode }); | ||
console.log('Response: ', { | ||
error: error, | ||
body: body, | ||
statusCode: statusCode | ||
}); | ||
/* eslint-enable */ | ||
next(request, response); | ||
@@ -21,0 +24,0 @@ }; |
@@ -1,3 +0,1 @@ | ||
/* */ | ||
function createLoggerMiddleware() { | ||
@@ -12,4 +10,9 @@ return function (next) { | ||
console.log('Request: ', request); | ||
console.log('Response: ', { error: error, body: body, statusCode: statusCode }); | ||
console.log('Response: ', { | ||
error: error, | ||
body: body, | ||
statusCode: statusCode | ||
}); | ||
/* eslint-enable */ | ||
next(request, response); | ||
@@ -16,0 +19,0 @@ }; |
(function (global, factory) { | ||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : | ||
typeof define === 'function' && define.amd ? define(['exports'], factory) : | ||
(factory((global.CommercetoolsSdkMiddlewareLogger = {}))); | ||
}(this, (function (exports) { 'use strict'; | ||
(global = global || self, factory(global.CommercetoolsSdkMiddlewareLogger = {})); | ||
}(this, function (exports) { 'use strict'; | ||
/* */ | ||
function createLoggerMiddleware() { | ||
@@ -18,4 +16,9 @@ return function (next) { | ||
console.log('Request: ', request); | ||
console.log('Response: ', { error: error, body: body, statusCode: statusCode }); | ||
console.log('Response: ', { | ||
error: error, | ||
body: body, | ||
statusCode: statusCode | ||
}); | ||
/* eslint-enable */ | ||
next(request, response); | ||
@@ -32,3 +35,3 @@ }; | ||
}))); | ||
})); | ||
//# sourceMappingURL=commercetools-sdk-middleware-logger.umd.js.map |
@@ -1,2 +0,2 @@ | ||
!function(e,o){"object"==typeof exports&&"undefined"!=typeof module?o(exports):"function"==typeof define&&define.amd?define(["exports"],o):o(e.CommercetoolsSdkMiddlewareLogger={})}(this,function(e){"use strict";e.createLoggerMiddleware=function(){return function(d){return function(e,o){var t=o.error,n=o.body,r=o.statusCode;console.log("Request: ",e),console.log("Response: ",{error:t,body:n,statusCode:r}),d(e,o)}}},Object.defineProperty(e,"__esModule",{value:!0})}); | ||
!function(e,o){"object"==typeof exports&&"undefined"!=typeof module?o(exports):"function"==typeof define&&define.amd?define(["exports"],o):o((e=e||self).CommercetoolsSdkMiddlewareLogger={})}(this,function(e){"use strict";e.createLoggerMiddleware=function(){return function(d){return function(e,o){var t=o.error,n=o.body,r=o.statusCode;console.log("Request: ",e),console.log("Response: ",{error:t,body:n,statusCode:r}),d(e,o)}}},Object.defineProperty(e,"__esModule",{value:!0})}); | ||
//# sourceMappingURL=commercetools-sdk-middleware-logger.umd.min.js.map |
@@ -7,3 +7,3 @@ { | ||
"name": "@commercetools/sdk-middleware-logger", | ||
"version": "1.0.7", | ||
"version": "2.0.0", | ||
"description": "Middleware for logging request and response being executed, to use with @commercetools/sdk-client", | ||
@@ -37,3 +37,4 @@ "keywords": [ | ||
"build:cjs": "cross-env NODE_ENV=rollup rollup -c ../../rollup.config.js -f cjs -n CommercetoolsSdkMiddlewareLogger -i src/index.js -o dist/commercetools-sdk-middleware-logger.cjs.js" | ||
} | ||
}, | ||
"gitHead": "313ea01030d33fb6c262c9cce428d19b5008ec9f" | ||
} |
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
11191
11
75
25311