mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-10-07 04:26:32 +08:00
- Update Sinon (breaking change does not affect us) - Update Mocha - Update Karma R=jacktfranklin@chromium.org Bug: none Change-Id: Ieb50ba55ce7a9e01e32ee553a6741e6323fcaaab Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3158223 Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org> Commit-Queue: Jack Franklin <jacktfranklin@chromium.org> Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org> Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
17 lines
389 B
JavaScript
17 lines
389 B
JavaScript
"use strict";
|
|
var inspect = require("util").inspect;
|
|
|
|
function log(response, request) {
|
|
var str;
|
|
|
|
str = `Request:\n${inspect(request)}\n\n`;
|
|
str += `Response:\n${inspect(response)}\n\n`;
|
|
|
|
/* istanbul ignore else: when this.logger is not a function, it can't be called */
|
|
if (typeof this.logger === "function") {
|
|
this.logger(str);
|
|
}
|
|
}
|
|
|
|
module.exports = log;
|