Ejemplo n.º 1
0
        public static LoggerConfiguration AliyunLog(
            this LoggerSinkConfiguration sinkConfiguration,
            ILogServiceClient logServiceClient,
            string logstoreName = null,
            string project      = null,
            string source       = null,
            string topic        = null,
            IDictionary <string, string> logTags   = null,
            LogEventLevel restrictedToMinimumLevel = LevelAlias.Minimum,
            string outputTemplate          = DefaultOutputTemplate,
            IFormatProvider formatProvider = null,
            LoggingLevelSwitch levelSwitch = null)
        {
            if (sinkConfiguration == null)
            {
                throw new ArgumentNullException(nameof(sinkConfiguration));
            }
            if (logstoreName == null)
            {
                throw new ArgumentNullException(nameof(logstoreName));
            }
            if (logServiceClient == null)
            {
                throw new ArgumentNullException(nameof(logServiceClient));
            }

            return(sinkConfiguration.AliyunLog(logServiceClient, null, logstoreName, project, source, topic, logTags, restrictedToMinimumLevel, levelSwitch));
        }