"use strict";
var console_sub_1 = require("./diagnostic-channel/console.sub");
var bunyan_sub_1 = require("./diagnostic-channel/bunyan.sub");
var winston_sub_1 = require("./diagnostic-channel/winston.sub");
require("./diagnostic-channel/initialization");
var AutoCollectConsole = (function () {
    function AutoCollectConsole(client) {
        if (!!AutoCollectConsole.INSTANCE) {
            throw new Error("Console logging adapter tracking should be configured from the applicationInsights object");
        }
        this._client = client;
        AutoCollectConsole.INSTANCE = this;
    }
    AutoCollectConsole.prototype.enable = function (isEnabled, collectConsoleLog) {
        console_sub_1.enable(isEnabled && collectConsoleLog, this._client);
        bunyan_sub_1.enable(isEnabled, this._client);
        winston_sub_1.enable(isEnabled, this._client);
    };
    AutoCollectConsole.prototype.isInitialized = function () {
        return this._isInitialized;
    };
    AutoCollectConsole.prototype.dispose = function () {
        AutoCollectConsole.INSTANCE = null;
        this.enable(false, false);
    };
    AutoCollectConsole._methodNames = ["debug", "info", "log", "warn", "error"];
    return AutoCollectConsole;
}());
module.exports = AutoCollectConsole;
//# sourceMappingURL=Console.js.map