Exemplo n.º 1
0
        public static LoggerConfiguration DingTalkBatched(
            this LoggerSinkConfiguration loggerSinkConfiguration,
            string webHookUrl,
            string containsTrigger                 = null,
            bool sendBatchesAsOneMessages          = true,
            IFormatProvider formatProvider         = null,
            LogEventLevel restrictedToMinimumLevel = LogEventLevel.Verbose
            )
        {
            Predicate <LogEvent> predicate = null;

            if (containsTrigger.IsNotNullOrEmpty())
            {
                predicate = x => x.MessageTemplate.Text.Contains(containsTrigger);
            }
            return(loggerSinkConfiguration.DingTalkBatched(webHookUrl, predicate, sendBatchesAsOneMessages, formatProvider, restrictedToMinimumLevel));
        }