26 lines
2.3 KiB
JavaScript
26 lines
2.3 KiB
JavaScript
|
"use strict";
|
||
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||
|
};
|
||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||
|
const indent_string_1 = __importDefault(require("indent-string"));
|
||
|
const util_1 = require("util");
|
||
|
const OPTIONS = {
|
||
|
isTestCafeInspect: true,
|
||
|
compact: false,
|
||
|
};
|
||
|
function default_1(logger, data) {
|
||
|
try {
|
||
|
const entry = data
|
||
|
// @ts-ignore
|
||
|
? (0, indent_string_1.default)(`\n${(0, util_1.inspect)(data, OPTIONS)}\n`, ' ', 4)
|
||
|
: '';
|
||
|
logger(entry);
|
||
|
}
|
||
|
catch (e) {
|
||
|
logger(e.stack ? e.stack : String(e));
|
||
|
}
|
||
|
}
|
||
|
exports.default = default_1;
|
||
|
module.exports = exports.default;
|
||
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibG9nLWVudHJ5LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL3V0aWxzL2xvZy1lbnRyeS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7OztBQUFBLGtFQUF5QztBQUN6QywrQkFBK0I7QUFHL0IsTUFBTSxPQUFPLEdBQUc7SUFDWixpQkFBaUIsRUFBRSxJQUFJO0lBQ3ZCLE9BQU8sRUFBWSxLQUFLO0NBQzNCLENBQUM7QUFFRixtQkFBeUIsTUFBZ0IsRUFBRSxJQUFhO0lBQ3BELElBQUk7UUFDQSxNQUFNLEtBQUssR0FBRyxJQUFJO1lBQ2QsYUFBYTtZQUNiLENBQUMsQ0FBQyxJQUFBLHVCQUFZLEVBQUMsS0FBSyxJQUFBLGNBQU8sRUFBQyxJQUFJLEVBQUUsT0FBTyxDQUFDLElBQUksRUFBRSxHQUFHLEVBQUUsQ0FBQyxDQUFDO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