import { ILogger } from '@villedemontreal/auth-core'; /** * plugin that will log a message before and after the execution of request, * and provide additional information such as status code, elapsed time, error... * @param logger the logger * @example * const config: AxiosRequestConfig = { * url: 'http://localhost:4004/secured/profile' * }; * requestLogger(new ConsoleLogger()).bind(config); * const response = await axios.request(config); * @example * const correlator = new HttpRequestCorrelator(); * const config: AxiosRequestConfig = { * url: 'http://localhost:4004/secured/profile' * }; * requestCorrelator(correlator).bind(config); * requestLogger(new ConsoleLogger(() => correlator.getId())).bind(config); * const response = await axios.request(config); * @example * const agent = axios.create(); * requestLogger(new ConsoleLogger()).bind(agent); * const config: AxiosRequestConfig = { * url: 'http://localhost:4004/secured/profile' * }; * const response = await agent.get('http://localhost:4004/secured/profile'); * @example * const config: AxiosRequestConfig = {}; * authenticator(session, authenticatorConfig).bind(config); * requestLogger(session.logger).bind(config); * const response = await axios.get('http://localhost:4004/secured/profile', config); */ export declare function requestLogger(logger: ILogger): import("./IAxiosPlugin").IAxiosPlugin;