CoolFace
Datasetpublic

basant307/AI_Governance_Project

sourceHugging Faceapache-2.0updated 2mo agoView on Hugging Face
0likes48downloads
ProxyLoggerProvider.js38 linesDownload Raw Back to esm
1/*2 * Copyright The OpenTelemetry Authors3 *4 * Licensed under the Apache License, Version 2.0 (the "License");5 * you may not use this file except in compliance with the License.6 * You may obtain a copy of the License at7 *8 *      https://www.apache.org/licenses/LICENSE-2.09 *10 * Unless required by applicable law or agreed to in writing, software11 * distributed under the License is distributed on an "AS IS" BASIS,12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.13 * See the License for the specific language governing permissions and14 * limitations under the License.15 */16import { NOOP_LOGGER_PROVIDER } from './NoopLoggerProvider';17import { ProxyLogger } from './ProxyLogger';18export class ProxyLoggerProvider {19    getLogger(name, version, options) {20        var _a;21        return ((_a = this.getDelegateLogger(name, version, options)) !== null && _a !== void 0 ? _a : new ProxyLogger(this, name, version, options));22    }23    getDelegate() {24        var _a;25        return (_a = this._delegate) !== null && _a !== void 0 ? _a : NOOP_LOGGER_PROVIDER;26    }27    /**28     * Set the delegate logger provider29     */30    setDelegate(delegate) {31        this._delegate = delegate;32    }33    getDelegateLogger(name, version, options) {34        var _a;35        return (_a = this._delegate) === null || _a === void 0 ? void 0 : _a.getLogger(name, version, options);36    }37}38//# sourceMappingURL=ProxyLoggerProvider.js.map
basant307/AI_Governance_Project · CoolFace