コード例 #1
0
        /// <summary>
        /// Add TomatoLog for Cosmos.Logging
        /// </summary>
        /// <param name="services"></param>
        /// <param name="settingAct"></param>
        /// <param name="configAct"></param>
        /// <returns></returns>
        public static ILogServiceCollection AddTomatoLog(this ILogServiceCollection services, Action <TomatoLogSinkOptions> settingAct = null,
                                                         Action <IConfiguration, TomatoLogSinkConfiguration> configAct = null)
        {
            var settings = new TomatoLogSinkOptions();

            settingAct?.Invoke(settings);
            return(services.AddTomatoLog(settings, configAct));
        }
コード例 #2
0
 /// <summary>
 /// Add TomatoLog for Cosmos.Logging
 /// </summary>
 /// <param name="services"></param>
 /// <param name="sinkOptions"></param>
 /// <param name="configAct"></param>
 /// <returns></returns>
 public static ILogServiceCollection AddTomatoLog(this ILogServiceCollection services, TomatoLogSinkOptions sinkOptions,
                                                  Action <IConfiguration, TomatoLogSinkConfiguration> configAct = null)
 {
     return(services.AddTomatoLog(Options.Create(sinkOptions), configAct));
 }