Exemplo n.º 1
0
        /// <summary>
        /// Construct a sink that saves logs to the specified storage account.
        /// </summary>
        /// <param name="applicationInsightsComponentId">The ID that determines the application component under which your data appears in Application Insights.</param>
        /// <param name="formatProvider">Supplies culture-specific formatting information, or null.</param>
        public ApplicationInsightsSink(string applicationInsightsComponentId, IFormatProvider formatProvider)
        {
            if (applicationInsightsComponentId == null)
            {
                throw new ArgumentNullException("applicationInsightsComponentId");
            }
            if (string.IsNullOrWhiteSpace(applicationInsightsComponentId))
            {
                throw new ArgumentOutOfRangeException("applicationInsightsComponentId", "Cannot be empty.");
            }

            _formatProvider = formatProvider;

            _loggingController = LoggingController.CreateLoggingController(applicationInsightsComponentId);
        }