UNPKG

1.28 kBTypeScriptView Raw
1import { HttpPipelineLogLevel } from "./httpPipelineLogLevel";
2/**
3 * A Logger that can be added to a HttpPipeline. This enables each RequestPolicy to log messages
4 * that can be used for debugging purposes.
5 */
6export interface HttpPipelineLogger {
7 /**
8 * The log level threshold for what logs will be logged.
9 */
10 minimumLogLevel: HttpPipelineLogLevel;
11 /**
12 * Log the provided message.
13 * @param logLevel The HttpLogDetailLevel associated with this message.
14 * @param message The message to log.
15 */
16 log(logLevel: HttpPipelineLogLevel, message: string): void;
17}
18/**
19 * A HttpPipelineLogger that will send its logs to the console.
20 */
21export declare class ConsoleHttpPipelineLogger implements HttpPipelineLogger {
22 minimumLogLevel: HttpPipelineLogLevel;
23 /**
24 * Create a new ConsoleHttpPipelineLogger.
25 * @param minimumLogLevel The log level threshold for what logs will be logged.
26 */
27 constructor(minimumLogLevel: HttpPipelineLogLevel);
28 /**
29 * Log the provided message.
30 * @param logLevel The HttpLogDetailLevel associated with this message.
31 * @param message The message to log.
32 */
33 log(logLevel: HttpPipelineLogLevel, message: string): void;
34}
35//# sourceMappingURL=httpPipelineLogger.d.ts.map
\No newline at end of file