public ApiRequestLogger(Assembly parentApplication, string applicationLoggingId, ILogFrameworkAgent frameworkLogger, ApiLogVerbosity apiLogVerbosity) : base(parentApplication,
                                                                                                                                                              LoggingMessageTypes.RequestResponse.ToString(), applicationLoggingId, frameworkLogger)
 {
     LogDurationInPushes = true;
     _apiLogVerbosity    = apiLogVerbosity;
 }
Example #2
0
        public static void AddApiLoggingServices(this IServiceCollection services, Assembly parentApplication, string applicationLogginId, ApiLogVerbosity apiLogVerbosity)
        {
            var serviceProvider = services.BuildServiceProvider();

            services.AddScoped <IApiRequestLogger, ApiRequestLogger>((ctx) =>
            {
                return(new ApiRequestLogger(parentApplication, applicationLogginId, serviceProvider.GetService <ILogFrameworkAgent>(), apiLogVerbosity));
            });
        }