Esempio n. 1
0
        /// <summary>
        /// Add console sink for Cosmos.Logging
        /// </summary>
        /// <param name="services"></param>
        /// <param name="settingAct"></param>
        /// <param name="configAction"></param>
        /// <returns></returns>
        public static ILogServiceCollection AddConsole(this ILogServiceCollection services, Action <ConsoleSinkOptions> settingAct = null,
                                                       Action <IConfiguration, ConsoleSinkConfiguration> configAction = null)
        {
            var settings = new ConsoleSinkOptions();

            settingAct?.Invoke(settings);
            return(services.AddConsole(settings, configAction));
        }
Esempio n. 2
0
 /// <summary>
 /// Add console sink for Cosmos.Logging
 /// </summary>
 /// <param name="services"></param>
 /// <param name="options"></param>
 /// <param name="configAction"></param>
 /// <returns></returns>
 public static ILogServiceCollection AddConsole(this ILogServiceCollection services, ConsoleSinkOptions options,
                                                Action <IConfiguration, ConsoleSinkConfiguration> configAction = null)
 {
     return(services.AddConsole(Options.Create(options), configAction));
 }