"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const winston = require("winston");
const os = require("os");
require("winston-log-and-exit");
const Graylog_1 = require("./Graylog");
const Console_1 = require("./Console");
const File_1 = require("./File");
const pkg = require('../../../package.json');
winston.configure({
    transports: [
        ...Console_1.default,
        ...File_1.default(),
        Graylog_1.default,
    ],
    rewriters: [
        function (level, msg, meta) {
            const additionalMeta = {
                osType: `${os.type()} ${os.release()}`,
                argv: process.argv.map(stringify),
                cli: pkg.version,
                node: process.version,
            };
            return Object.assign(Object.assign({}, meta), additionalMeta);
        },
    ],
});
winston.cli();
winston.debug('Command message');
exports.default = winston;
function stringify(value) {
    return JSON.stringify(value);
}
//# sourceMappingURL=index.js.map