1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | exports.rootLogger = void 0;
|
4 | var bs_logger_1 = require("bs-logger");
|
5 | var backports_1 = require("./backports");
|
6 | var original = process.env.TS_JEST_LOG;
|
7 | var buildOptions = function () {
|
8 | var _a;
|
9 | return ({
|
10 | context: (_a = {},
|
11 | _a[bs_logger_1.LogContexts.package] = 'ts-jest',
|
12 | _a[bs_logger_1.LogContexts.logLevel] = bs_logger_1.LogLevels.trace,
|
13 | _a.version = require('../../package.json').version,
|
14 | _a),
|
15 | targets: process.env.TS_JEST_LOG || undefined,
|
16 | });
|
17 | };
|
18 | exports.rootLogger = (0, bs_logger_1.createLogger)(buildOptions());
|
19 | (0, backports_1.backportTsJestDebugEnvVar)(exports.rootLogger);
|
20 |
|
21 | if (original !== process.env.TS_JEST_LOG) {
|
22 | exports.rootLogger = (0, bs_logger_1.createLogger)(buildOptions());
|
23 | }
|