/// <summary> /// /// </summary> /// <param name="builder">Using ILogging builder</param> /// <param name="configFile">nlog.config file</param> /// <param name="kafkaTaget">Ip and port of Kafka cluster</param> /// <param name="applicationStore">Application name and Application Id</param> public static void UseNLog(this ILoggingBuilder builder, string configFile, string kafkaTaget, LogSourceTypeEnums applicationStore) { NLogTargetCustom.RegisterTarget(); StaticConfiguration.KafkaServer = kafkaTaget; StaticConfiguration.ApplicationStore = new Dictionary <int, string> { { (int)applicationStore, (EnumConvert.GetEnumDescription(applicationStore)) } }; builder.AddNLog(configFile); }