// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the Microsoft Software License Terms for the Azure Communications Services, Azure CPaaS, MICROSOFT AZURE COMMUNICATION CALLING EFFECTS
// See LICENSE file for license information.

import{getDateInIsoFormat as e}from"./cd7b0b.js";class LoggerImpl{constructor(e,t=[]){this._azureLogger=e,this._namespace=t,this._namespaceFormatted=this._namespace.map((e=>e())).join(":")}createChild(e){return new LoggerImpl(this._azureLogger,[...this._namespace,"string"==typeof e?()=>e:e])}createFnLogger(e,t,...r){return this.createChild(this.getPrefix(e,t)+r.join(""))}log(...e){const t=this.getMessage(e);this._azureLogger.verbose(t)}debug(...e){const t=this.getMessage(e);this._azureLogger.verbose(t)}info(...e){const t=this.getMessage(e);this._azureLogger.info(t)}warn(...e){const t=this.getMessage(e);this._azureLogger.warning(t)}error(...e){const t=this.getMessage(e);this._azureLogger.error(t)}getMessage(...t){return`${e()} ${this._namespaceFormatted} ${t.join(" ")}`}getPrefix(e,t){let r="";return t&&(r+=t),e&&(r+=e),r}}export{LoggerImpl};
