"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.fileFormat = exports.consoleFormat = void 0;
const os = require("os");
const winston_1 = require("winston");
const pkg = require('../../../package.json');
exports.consoleFormat = winston_1.format.printf((info) => {
    const levelColorizer = winston_1.format.colorize();
    const coloredLevel = info.level.toUpperCase();
    return `${levelColorizer.colorize(info.level, coloredLevel)}: ${info.message}`;
});
exports.fileFormat = winston_1.format.combine(winston_1.format.timestamp(), winston_1.format.printf(({ level, message, timestamp }) => {
    const additionalMeta = {
        osType: `${os.type()} ${os.release()}`,
        argv: process.argv.map(stringify),
        cli: pkg.version,
        node: process.version,
    };
    return JSON.stringify(Object.assign(Object.assign({}, additionalMeta), { level, message, timestamp }));
}));
function stringify(value) {
    return JSON.stringify(value);
}
//# sourceMappingURL=transportFormats.js.map