UNPKG

@microsoft/api-extractor

Version:

Validate, document, and review the exported API for a TypeScript library

40 lines (38 loc) 1.11 kB
"use strict"; // Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. // See LICENSE in the project root for license information. Object.defineProperty(exports, "__esModule", { value: true }); /** * Used to collect statistics for an ILogger implementation. */ class MonitoredLogger { constructor(logger) { this._innerLogger = logger; this.resetCounters(); } logVerbose(message) { ++this.messageCount; this._innerLogger.logVerbose(message); } logInfo(message) { ++this.messageCount; this._innerLogger.logInfo(message); } logWarning(message) { ++this.messageCount; ++this.warningCount; this._innerLogger.logWarning(message); } logError(message) { ++this.messageCount; ++this.errorCount; this._innerLogger.logError(message); } resetCounters() { this.errorCount = 0; this.warningCount = 0; this.messageCount = 0; } } exports.MonitoredLogger = MonitoredLogger; //# sourceMappingURL=MonitoredLogger.js.map