import { HttpPipelineLogLevel } from "./httpPipelineLogLevel" ; /**
 * A Logger that can be added to a HttpPipeline. This enables each RequestPolicy to log messages
 * that can be used for debugging purposes.
 */ export interface HttpPipelineLogger { /**
     * The log level threshold for what logs will be logged.
     */ minimumLogLevel : HttpPipelineLogLevel ; param logLevel param message log ( logLevel , message ) : void ; } /**
 * A HttpPipelineLogger that will send its logs to the console.
 */ export class ConsoleHttpPipelineLogger implements HttpPipelineLogger { param minimumLogLevel constructor ( public minimumLogLevel ) { } param logLevel param message log ( logLevel , message ) { const logMessage = `${ HttpPipelineLogLevel [ logLevel ] }: ${ message }` ; switch ( logLevel ) { case HttpPipelineLogLevel . ERROR : console . error ( logMessage ) ; break ; case HttpPipelineLogLevel . WARNING : console . warn ( logMessage ) ; break ; case HttpPipelineLogLevel . INFO : console . log ( logMessage ) ; break ; } } }