{"version":3,"sources":["src/sdk/Diagnostics.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEzC,aAAK,WAAW,GAAG,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;AAEvC;;;GAGG;AACH,qBAAa,WAAW;IACpB,OAAO,CAAC,MAAM,CAAC,YAAY,CAAqC;WAElD,eAAe,CAAC,QAAQ,EAAE,QAAQ,GAAG,IAAI;WAKzC,kBAAkB,IAAI,IAAI;WAM1B,iBAAiB,IAAI,IAAI;WAMzB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAWlD,WAAkB,WAAW,CAAE,QAAQ,EAAE,WAAW,EAInD;CAEJ","file":"Diagnostics.d.ts","sourcesContent":["//\n// Copyright (c) Microsoft. All rights reserved.\n// Licensed under the MIT license. See LICENSE.md file in the project root for full license information.\n//\n\nimport { ConsoleLoggingListener } from \"../common.browser/Exports.js\";\nimport { Events } from \"../common/Exports.js\";\nimport { LogLevel } from \"./LogLevel.js\";\n\ntype LogCallback = (s: string) => void;\n\n/**\n * Defines diagnostics API for managing console output\n * Added in version 1.21.0\n */\nexport class Diagnostics {\n    private static privListener: ConsoleLoggingListener = undefined;\n\n    public static SetLoggingLevel(logLevel: LogLevel): void {\n        this.privListener = new ConsoleLoggingListener(logLevel);\n        Events.instance.attachConsoleListener(this.privListener);\n    }\n\n    public static StartConsoleOutput(): void {\n        if (!!this.privListener) {\n            this.privListener.enableConsoleOutput = true;\n        }\n    }\n\n    public static StopConsoleOutput(): void {\n        if (!!this.privListener) {\n            this.privListener.enableConsoleOutput = false;\n        }\n    }\n\n    public static SetLogOutputPath(path: string): void {\n        if (typeof window === \"undefined\") {\n            if (!!this.privListener) {\n                this.privListener.logPath = path;\n            }\n        } else {\n            throw new Error(\"File system logging not available in browser.\");\n        }\n    }\n\n\n    public static set onLogOutput( callback: LogCallback ) {\n        if (!!this.privListener) {\n            this.privListener.logCallback = callback;\n        }\n    }\n\n}\n"]}