e2ed
Version:
E2E testing framework over Playwright
17 lines (16 loc) • 788 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.logWithPreparedOptions = void 0;
const runId_1 = require("../../context/runId");
const generalLog_1 = require("../generalLog");
const userland_1 = require("../userland");
/**
* Logs (with prepared options) message with optional payload to console and to log file.
* @internal
*/
const logWithPreparedOptions = (message, { payload, runId = (0, runId_1.getRunId)(), type, utcTimeInMs = Date.now() }) => {
const { getLogContext } = (0, userland_1.getUserlandHooks)();
const context = getLogContext(message, payload, type);
(0, generalLog_1.generalLog)(message, payload, { context, prefixEnding: `[${runId}]`, type, utcTimeInMs });
};
exports.logWithPreparedOptions = logWithPreparedOptions;