diff --git a/src/Logging/Logging.AzureAppServices/src/AzureAppServicesDiagnosticsSettings.cs b/src/Logging/Logging.AzureAppServices/src/AzureAppServicesDiagnosticsSettings.cs deleted file mode 100644 index f93538218f..0000000000 --- a/src/Logging/Logging.AzureAppServices/src/AzureAppServicesDiagnosticsSettings.cs +++ /dev/null @@ -1,162 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using System; - -namespace Microsoft.Extensions.Logging.AzureAppServices -{ - /// - /// Settings for Azure diagnostics logging. - /// - [Obsolete("This type is obsolete and will be removed in a future version. The recommended alternative is AzureBlobLoggerOptions.")] - public class AzureAppServicesDiagnosticsSettings - { - private TimeSpan _blobCommitPeriod = TimeSpan.FromSeconds(5); - private int _blobBatchSize = 32; - private string _outputTemplate = "{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz} [{Level}] {Message}{NewLine}{Exception}"; - private int _retainedFileCountLimit = 2; - private int _fileSizeLimit = 10 * 1024 * 1024; - private string _blobName = "applicationLog.txt"; - private TimeSpan? _fileFlushPeriod = TimeSpan.FromSeconds(1); - private int _backgroundQueueSize; - - /// - /// Gets or sets a strictly positive value representing the maximum log size in bytes. - /// Once the log is full, no more messages will be appended. - /// Defaults to 10MB. - /// - public int FileSizeLimit - { - get { return _fileSizeLimit; } - set - { - if (value <= 0) - { - throw new ArgumentOutOfRangeException(nameof(value), $"{nameof(FileSizeLimit)} must be positive."); - } - _fileSizeLimit = value; - } - } - - /// - /// Gets or sets a strictly positive value representing the maximum retained file count. - /// Defaults to 2. - /// - public int RetainedFileCountLimit - { - get { return _retainedFileCountLimit; } - set - { - if (value <= 0) - { - throw new ArgumentOutOfRangeException(nameof(value), $"{nameof(RetainedFileCountLimit)} must be positive."); - } - _retainedFileCountLimit = value; - } - } - - /// - /// Gets or sets a message template describing the output messages. - /// Defaults to "{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz} [{Level}] {Message}{NewLine}{Exception}". - /// - public string OutputTemplate - { - get { return _outputTemplate; } - set - { - if (string.IsNullOrEmpty(value)) - { - throw new ArgumentException(nameof(value), $"{nameof(OutputTemplate)} must be non-empty string."); - } - _outputTemplate = value; - } - } - - /// - /// Gets or sets a maximum number of events to include in a single blob append batch. - /// Defaults to 32. - /// - public int BlobBatchSize - { - get { return _blobBatchSize; } - set - { - if (value <= 0) - { - throw new ArgumentOutOfRangeException(nameof(value), $"{nameof(BlobBatchSize)} must be positive."); - } - _blobBatchSize = value; - } - } - - /// - /// Gets or sets a time to wait between checking for blob log batches. - /// Defaults to 5 seconds. - /// - public TimeSpan BlobCommitPeriod - { - get { return _blobCommitPeriod; } - set - { - if (value < TimeSpan.Zero) - { - throw new ArgumentOutOfRangeException(nameof(value), $"{nameof(BlobCommitPeriod)} must be positive."); - } - _blobCommitPeriod = value; - } - } - - /// - /// Gets or sets the last section of log blob name. - /// Defaults to "applicationLog.txt". - /// - public string BlobName - { - get { return _blobName; } - set - { - if (string.IsNullOrEmpty(value)) - { - throw new ArgumentException(nameof(value), $"{nameof(BlobName)} must be non-empty string."); - } - _blobName = value; - } - } - - /// - /// Gets or sets the maximum size of the background log message queue or 0 for no limit. - /// After maximum queue size is reached log event sink would start blocking. - /// Defaults to 0. - /// - public int BackgroundQueueSize - { - get { return _backgroundQueueSize; } - set - { - if (value < 0) - { - throw new ArgumentOutOfRangeException(nameof(value), $"{nameof(BackgroundQueueSize)} must be non-negative."); - } - _backgroundQueueSize = value; - } - } - - /// - /// Gets or sets the period after which logs will be flushed to disk or - /// null if auto flushing is not required. - /// Defaults to 1 second. - /// - public TimeSpan? FileFlushPeriod - { - get { return _fileFlushPeriod; } - set - { - if (value < TimeSpan.Zero) - { - throw new ArgumentOutOfRangeException(nameof(value), $"{nameof(FileFlushPeriod)} must be positive."); - } - _fileFlushPeriod = value; - } - } - } -} \ No newline at end of file diff --git a/src/Logging/Logging.AzureAppServices/src/AzureAppServicesLoggerFactoryExtensions.cs b/src/Logging/Logging.AzureAppServices/src/AzureAppServicesLoggerFactoryExtensions.cs index ea558a0974..cbf9ec7d35 100644 --- a/src/Logging/Logging.AzureAppServices/src/AzureAppServicesLoggerFactoryExtensions.cs +++ b/src/Logging/Logging.AzureAppServices/src/AzureAppServicesLoggerFactoryExtensions.cs @@ -1,4 +1,4 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; @@ -6,7 +6,6 @@ using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection.Extensions; using Microsoft.Extensions.Logging.AzureAppServices; -using Microsoft.Extensions.Logging.AzureAppServices.Internal; using Microsoft.Extensions.Logging.Configuration; using Microsoft.Extensions.Options; using static Microsoft.Extensions.DependencyInjection.ServiceDescriptor; @@ -93,103 +92,5 @@ namespace Microsoft.Extensions.Logging provider: typeof(FileLoggerProvider), levelKey: "AzureDriveTraceLevel"); } - - /// - /// Adds an Azure Web Apps diagnostics logger. - /// - /// The extension method argument - [Obsolete("This method is obsolete and will be removed in a future version. The recommended alternative is AddAzureWebAppDiagnostics(this ILoggingBuilder builder).")] - public static ILoggerFactory AddAzureWebAppDiagnostics(this ILoggerFactory factory) - { - return AddAzureWebAppDiagnostics(factory, new AzureAppServicesDiagnosticsSettings()); - } - - /// - /// Adds an Azure Web Apps diagnostics logger. - /// - /// The extension method argument - /// The setting object to configure loggers. - [Obsolete("This method is obsolete and will be removed in a future version. The recommended alternative is AddAzureWebAppDiagnostics(this ILoggingBuilder builder).")] - public static ILoggerFactory AddAzureWebAppDiagnostics(this ILoggerFactory factory, AzureAppServicesDiagnosticsSettings settings) - { - var context = WebAppContext.Default; - if (!context.IsRunningInAzureWebApp) - { - return factory; - } - - var config = SiteConfigurationProvider.GetAzureLoggingConfiguration(context); - - // Only add the provider if we're in Azure WebApp. That cannot change once the apps started - var fileOptions = new OptionsMonitor( - new OptionsFactory( - new IConfigureOptions[] - { - new FileLoggerConfigureOptions(config, context), - new ConfigureOptions(options => - { - options.FileSizeLimit = settings.FileSizeLimit; - options.RetainedFileCountLimit = settings.RetainedFileCountLimit; - options.BackgroundQueueSize = settings.BackgroundQueueSize == 0 ? (int?) null : settings.BackgroundQueueSize; - - if (settings.FileFlushPeriod != null) - { - options.FlushPeriod = settings.FileFlushPeriod.Value; - } - }) - }, - new IPostConfigureOptions[0] - ), - new[] - { - new ConfigurationChangeTokenSource(config) - }, - new OptionsCache() - ); - - var blobOptions = new OptionsMonitor( - new OptionsFactory( - new IConfigureOptions[] { - new BlobLoggerConfigureOptions(config, context), - new ConfigureOptions(options => - { - options.BlobName = settings.BlobName; - options.FlushPeriod = settings.BlobCommitPeriod; - options.BatchSize = settings.BlobBatchSize; - options.BackgroundQueueSize = settings.BackgroundQueueSize == 0 ? (int?) null : settings.BackgroundQueueSize; - }) - }, - new IPostConfigureOptions[0] - ), - new[] - { - new ConfigurationChangeTokenSource(config) - }, - new OptionsCache() - ); - - var filterOptions = new OptionsMonitor( - new OptionsFactory( - new[] - { - CreateFileFilterConfigureOptions(config), - CreateBlobFilterConfigureOptions(config) - }, - new IPostConfigureOptions[0]), - new [] { new ConfigurationChangeTokenSource(config) }, - new OptionsCache()); - - factory.AddProvider(new ForwardingLoggerProvider( - new LoggerFactory( - new ILoggerProvider[] - { - new FileLoggerProvider(fileOptions), - new BlobLoggerProvider(blobOptions) - }, - filterOptions - ) - )); - return factory; - } } } diff --git a/src/Logging/Logging.AzureAppServices/src/AzureBlobLoggerOptions.cs b/src/Logging/Logging.AzureAppServices/src/AzureBlobLoggerOptions.cs index 2f1285f8ac..6af815457c 100644 --- a/src/Logging/Logging.AzureAppServices/src/AzureBlobLoggerOptions.cs +++ b/src/Logging/Logging.AzureAppServices/src/AzureBlobLoggerOptions.cs @@ -1,8 +1,7 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; -using Microsoft.Extensions.Logging.AzureAppServices.Internal; namespace Microsoft.Extensions.Logging.AzureAppServices { @@ -36,4 +35,4 @@ namespace Microsoft.Extensions.Logging.AzureAppServices internal string ApplicationInstanceId { get; set; } } -} \ No newline at end of file +} diff --git a/src/Logging/Logging.AzureAppServices/src/AzureFileLoggerOptions.cs b/src/Logging/Logging.AzureAppServices/src/AzureFileLoggerOptions.cs index d9b8e89198..30694e5fc7 100644 --- a/src/Logging/Logging.AzureAppServices/src/AzureFileLoggerOptions.cs +++ b/src/Logging/Logging.AzureAppServices/src/AzureFileLoggerOptions.cs @@ -1,8 +1,7 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; -using Microsoft.Extensions.Logging.AzureAppServices.Internal; namespace Microsoft.Extensions.Logging.AzureAppServices { diff --git a/src/Logging/Logging.AzureAppServices/src/Internal/BatchLoggerConfigureOptions.cs b/src/Logging/Logging.AzureAppServices/src/BatchLoggerConfigureOptions.cs similarity index 86% rename from src/Logging/Logging.AzureAppServices/src/Internal/BatchLoggerConfigureOptions.cs rename to src/Logging/Logging.AzureAppServices/src/BatchLoggerConfigureOptions.cs index 3982193dd8..a50bd65b32 100644 --- a/src/Logging/Logging.AzureAppServices/src/Internal/BatchLoggerConfigureOptions.cs +++ b/src/Logging/Logging.AzureAppServices/src/BatchLoggerConfigureOptions.cs @@ -4,9 +4,9 @@ using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Options; -namespace Microsoft.Extensions.Logging.AzureAppServices.Internal +namespace Microsoft.Extensions.Logging.AzureAppServices { - public class BatchLoggerConfigureOptions : IConfigureOptions + internal class BatchLoggerConfigureOptions : IConfigureOptions { private readonly IConfiguration _configuration; private readonly string _isEnabledKey; @@ -33,4 +33,4 @@ namespace Microsoft.Extensions.Logging.AzureAppServices.Internal return result; } } -} \ No newline at end of file +} diff --git a/src/Logging/Logging.AzureAppServices/src/Internal/BatchingLogger.cs b/src/Logging/Logging.AzureAppServices/src/BatchingLogger.cs similarity index 92% rename from src/Logging/Logging.AzureAppServices/src/Internal/BatchingLogger.cs rename to src/Logging/Logging.AzureAppServices/src/BatchingLogger.cs index e207fbf2a2..b2960802d4 100644 --- a/src/Logging/Logging.AzureAppServices/src/Internal/BatchingLogger.cs +++ b/src/Logging/Logging.AzureAppServices/src/BatchingLogger.cs @@ -1,12 +1,12 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; using System.Text; -namespace Microsoft.Extensions.Logging.AzureAppServices.Internal +namespace Microsoft.Extensions.Logging.AzureAppServices { - public class BatchingLogger : ILogger + internal class BatchingLogger : ILogger { private readonly BatchingLoggerProvider _provider; private readonly string _category; diff --git a/src/Logging/Logging.AzureAppServices/src/Internal/BatchingLoggerOptions.cs b/src/Logging/Logging.AzureAppServices/src/BatchingLoggerOptions.cs similarity index 95% rename from src/Logging/Logging.AzureAppServices/src/Internal/BatchingLoggerOptions.cs rename to src/Logging/Logging.AzureAppServices/src/BatchingLoggerOptions.cs index 89a8f2a1e7..23998fb5d1 100644 --- a/src/Logging/Logging.AzureAppServices/src/Internal/BatchingLoggerOptions.cs +++ b/src/Logging/Logging.AzureAppServices/src/BatchingLoggerOptions.cs @@ -1,9 +1,9 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; -namespace Microsoft.Extensions.Logging.AzureAppServices.Internal +namespace Microsoft.Extensions.Logging.AzureAppServices { public class BatchingLoggerOptions { @@ -73,4 +73,4 @@ namespace Microsoft.Extensions.Logging.AzureAppServices.Internal /// public bool IncludeScopes { get; set; } = false; } -} \ No newline at end of file +} diff --git a/src/Logging/Logging.AzureAppServices/src/Internal/BatchingLoggerProvider.cs b/src/Logging/Logging.AzureAppServices/src/BatchingLoggerProvider.cs similarity index 87% rename from src/Logging/Logging.AzureAppServices/src/Internal/BatchingLoggerProvider.cs rename to src/Logging/Logging.AzureAppServices/src/BatchingLoggerProvider.cs index 626412e504..5b375a2b5a 100644 --- a/src/Logging/Logging.AzureAppServices/src/Internal/BatchingLoggerProvider.cs +++ b/src/Logging/Logging.AzureAppServices/src/BatchingLoggerProvider.cs @@ -8,7 +8,7 @@ using System.Threading; using System.Threading.Tasks; using Microsoft.Extensions.Options; -namespace Microsoft.Extensions.Logging.AzureAppServices.Internal +namespace Microsoft.Extensions.Logging.AzureAppServices { public abstract class BatchingLoggerProvider: ILoggerProvider, ISupportExternalScope { @@ -29,7 +29,7 @@ namespace Microsoft.Extensions.Logging.AzureAppServices.Internal internal IExternalScopeProvider ScopeProvider => _includeScopes ? _scopeProvider : null; - protected BatchingLoggerProvider(IOptionsMonitor options) + internal BatchingLoggerProvider(IOptionsMonitor options) { // NOTE: Only IsEnabled is monitored @@ -73,7 +73,7 @@ namespace Microsoft.Extensions.Logging.AzureAppServices.Internal } - protected abstract Task WriteMessagesAsync(IEnumerable messages, CancellationToken token); + internal abstract Task WriteMessagesAsync(IEnumerable messages, CancellationToken token); private async Task ProcessLogQueue(object state) { @@ -90,11 +90,7 @@ namespace Microsoft.Extensions.Logging.AzureAppServices.Internal var messagesDropped = Interlocked.Exchange(ref _messagesDropped, 0); if (messagesDropped != 0) { - _currentBatch.Add(new LogMessage() - { - Message = $"{messagesDropped} message(s) dropped because of queue size limit. Increase the queue size or decrease logging verbosity to avoid this.{Environment.NewLine}", - Timestamp = DateTimeOffset.Now - }); + _currentBatch.Add(new LogMessage(DateTimeOffset.Now, $"{messagesDropped} message(s) dropped because of queue size limit. Increase the queue size or decrease logging verbosity to avoid this.{Environment.NewLine}")); } if (_currentBatch.Count > 0) @@ -128,7 +124,7 @@ namespace Microsoft.Extensions.Logging.AzureAppServices.Internal { try { - if (!_messageQueue.TryAdd(new LogMessage { Message = message, Timestamp = timestamp }, millisecondsTimeout: 0, cancellationToken: _cancellationTokenSource.Token)) + if (!_messageQueue.TryAdd(new LogMessage(timestamp, message), millisecondsTimeout: 0, cancellationToken: _cancellationTokenSource.Token)) { Interlocked.Increment(ref _messagesDropped); } diff --git a/src/Logging/Logging.AzureAppServices/src/Internal/BlobAppendReferenceWrapper.cs b/src/Logging/Logging.AzureAppServices/src/BlobAppendReferenceWrapper.cs similarity index 94% rename from src/Logging/Logging.AzureAppServices/src/Internal/BlobAppendReferenceWrapper.cs rename to src/Logging/Logging.AzureAppServices/src/BlobAppendReferenceWrapper.cs index e0702275cb..bf6656f9f3 100644 --- a/src/Logging/Logging.AzureAppServices/src/Internal/BlobAppendReferenceWrapper.cs +++ b/src/Logging/Logging.AzureAppServices/src/BlobAppendReferenceWrapper.cs @@ -1,4 +1,4 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; @@ -7,10 +7,10 @@ using System.Net.Http; using System.Threading; using System.Threading.Tasks; -namespace Microsoft.Extensions.Logging.AzureAppServices.Internal +namespace Microsoft.Extensions.Logging.AzureAppServices { /// - public class BlobAppendReferenceWrapper : ICloudAppendBlob + internal class BlobAppendReferenceWrapper : ICloudAppendBlob { private readonly Uri _fullUri; private readonly HttpClient _client; @@ -93,4 +93,4 @@ namespace Microsoft.Extensions.Logging.AzureAppServices.Internal uriBuilder.Query = queryToAppend; } } -} \ No newline at end of file +} diff --git a/src/Logging/Logging.AzureAppServices/src/Internal/BlobLoggerConfigureOptions.cs b/src/Logging/Logging.AzureAppServices/src/BlobLoggerConfigureOptions.cs similarity index 79% rename from src/Logging/Logging.AzureAppServices/src/Internal/BlobLoggerConfigureOptions.cs rename to src/Logging/Logging.AzureAppServices/src/BlobLoggerConfigureOptions.cs index 25ea1b6af6..d07f76795d 100644 --- a/src/Logging/Logging.AzureAppServices/src/Internal/BlobLoggerConfigureOptions.cs +++ b/src/Logging/Logging.AzureAppServices/src/BlobLoggerConfigureOptions.cs @@ -1,12 +1,12 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Options; -namespace Microsoft.Extensions.Logging.AzureAppServices.Internal +namespace Microsoft.Extensions.Logging.AzureAppServices { - public class BlobLoggerConfigureOptions : BatchLoggerConfigureOptions, IConfigureOptions + internal class BlobLoggerConfigureOptions : BatchLoggerConfigureOptions, IConfigureOptions { private readonly IConfiguration _configuration; private readonly IWebAppContext _context; @@ -26,4 +26,4 @@ namespace Microsoft.Extensions.Logging.AzureAppServices.Internal options.ApplicationInstanceId = _context.SiteInstanceId; } } -} \ No newline at end of file +} diff --git a/src/Logging/Logging.AzureAppServices/src/Internal/BlobLoggerProvider.cs b/src/Logging/Logging.AzureAppServices/src/BlobLoggerProvider.cs similarity index 89% rename from src/Logging/Logging.AzureAppServices/src/Internal/BlobLoggerProvider.cs rename to src/Logging/Logging.AzureAppServices/src/BlobLoggerProvider.cs index 96c98fa455..abcba026fb 100644 --- a/src/Logging/Logging.AzureAppServices/src/Internal/BlobLoggerProvider.cs +++ b/src/Logging/Logging.AzureAppServices/src/BlobLoggerProvider.cs @@ -1,4 +1,4 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; @@ -11,7 +11,7 @@ using System.Threading; using System.Threading.Tasks; using Microsoft.Extensions.Options; -namespace Microsoft.Extensions.Logging.AzureAppServices.Internal +namespace Microsoft.Extensions.Logging.AzureAppServices { /// /// The implementation that stores messages by appending them to Azure Blob in batches. @@ -28,7 +28,7 @@ namespace Microsoft.Extensions.Logging.AzureAppServices.Internal /// Creates a new instance of /// /// - public BlobLoggerProvider(IOptionsMonitor options) + internal BlobLoggerProvider(IOptionsMonitor options) : this(options, null) { _blobReferenceFactory = name => new BlobAppendReferenceWrapper( @@ -42,7 +42,7 @@ namespace Microsoft.Extensions.Logging.AzureAppServices.Internal /// /// The container to store logs to. /// - public BlobLoggerProvider( + internal BlobLoggerProvider( IOptionsMonitor options, Func blobReferenceFactory) : base(options) @@ -54,7 +54,7 @@ namespace Microsoft.Extensions.Logging.AzureAppServices.Internal _httpClient = new HttpClient(); } - protected override async Task WriteMessagesAsync(IEnumerable messages, CancellationToken cancellationToken) + internal override async Task WriteMessagesAsync(IEnumerable messages, CancellationToken cancellationToken) { var eventGroups = messages.GroupBy(GetBlobKey); foreach (var eventGroup in eventGroups) @@ -88,4 +88,4 @@ namespace Microsoft.Extensions.Logging.AzureAppServices.Internal e.Timestamp.Hour); } } -} \ No newline at end of file +} diff --git a/src/Logging/Logging.AzureAppServices/src/Internal/ConfigurationBasedLevelSwitcher.cs b/src/Logging/Logging.AzureAppServices/src/ConfigurationBasedLevelSwitcher.cs similarity index 87% rename from src/Logging/Logging.AzureAppServices/src/Internal/ConfigurationBasedLevelSwitcher.cs rename to src/Logging/Logging.AzureAppServices/src/ConfigurationBasedLevelSwitcher.cs index 388a4ed54e..77e5a399d0 100644 --- a/src/Logging/Logging.AzureAppServices/src/Internal/ConfigurationBasedLevelSwitcher.cs +++ b/src/Logging/Logging.AzureAppServices/src/ConfigurationBasedLevelSwitcher.cs @@ -1,13 +1,13 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Options; -namespace Microsoft.Extensions.Logging.AzureAppServices.Internal +namespace Microsoft.Extensions.Logging.AzureAppServices { - public class ConfigurationBasedLevelSwitcher: IConfigureOptions + internal class ConfigurationBasedLevelSwitcher: IConfigureOptions { private readonly IConfiguration _configuration; private readonly Type _provider; @@ -47,4 +47,4 @@ namespace Microsoft.Extensions.Logging.AzureAppServices.Internal } } } -} \ No newline at end of file +} diff --git a/src/Logging/Logging.AzureAppServices/src/Internal/FileLoggerConfigureOptions.cs b/src/Logging/Logging.AzureAppServices/src/FileLoggerConfigureOptions.cs similarity index 74% rename from src/Logging/Logging.AzureAppServices/src/Internal/FileLoggerConfigureOptions.cs rename to src/Logging/Logging.AzureAppServices/src/FileLoggerConfigureOptions.cs index 00037bca87..e7d8a84492 100644 --- a/src/Logging/Logging.AzureAppServices/src/Internal/FileLoggerConfigureOptions.cs +++ b/src/Logging/Logging.AzureAppServices/src/FileLoggerConfigureOptions.cs @@ -1,13 +1,13 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.IO; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Options; -namespace Microsoft.Extensions.Logging.AzureAppServices.Internal +namespace Microsoft.Extensions.Logging.AzureAppServices { - public class FileLoggerConfigureOptions : BatchLoggerConfigureOptions, IConfigureOptions + internal class FileLoggerConfigureOptions : BatchLoggerConfigureOptions, IConfigureOptions { private readonly IWebAppContext _context; @@ -23,4 +23,4 @@ namespace Microsoft.Extensions.Logging.AzureAppServices.Internal options.LogDirectory = Path.Combine(_context.HomeFolder, "LogFiles", "Application"); } } -} \ No newline at end of file +} diff --git a/src/Logging/Logging.AzureAppServices/src/Internal/FileLoggerProvider.cs b/src/Logging/Logging.AzureAppServices/src/FileLoggerProvider.cs similarity index 85% rename from src/Logging/Logging.AzureAppServices/src/Internal/FileLoggerProvider.cs rename to src/Logging/Logging.AzureAppServices/src/FileLoggerProvider.cs index 154f609225..9da2dcbe5a 100644 --- a/src/Logging/Logging.AzureAppServices/src/Internal/FileLoggerProvider.cs +++ b/src/Logging/Logging.AzureAppServices/src/FileLoggerProvider.cs @@ -8,7 +8,7 @@ using System.Threading; using System.Threading.Tasks; using Microsoft.Extensions.Options; -namespace Microsoft.Extensions.Logging.AzureAppServices.Internal +namespace Microsoft.Extensions.Logging.AzureAppServices { [ProviderAlias("AzureAppServicesFile")] public class FileLoggerProvider : BatchingLoggerProvider @@ -18,7 +18,7 @@ namespace Microsoft.Extensions.Logging.AzureAppServices.Internal private readonly int? _maxFileSize; private readonly int? _maxRetainedFiles; - public FileLoggerProvider(IOptionsMonitor options) : base(options) + internal FileLoggerProvider(IOptionsMonitor options) : base(options) { var loggerOptions = options.CurrentValue; _path = loggerOptions.LogDirectory; @@ -27,7 +27,7 @@ namespace Microsoft.Extensions.Logging.AzureAppServices.Internal _maxRetainedFiles = loggerOptions.RetainedFileCountLimit; } - protected override async Task WriteMessagesAsync(IEnumerable messages, CancellationToken cancellationToken) + internal override async Task WriteMessagesAsync(IEnumerable messages, CancellationToken cancellationToken) { Directory.CreateDirectory(_path); @@ -57,12 +57,12 @@ namespace Microsoft.Extensions.Logging.AzureAppServices.Internal return Path.Combine(_path, $"{_fileName}{group.Year:0000}{group.Month:00}{group.Day:00}.txt"); } - public (int Year, int Month, int Day) GetGrouping(LogMessage message) + private (int Year, int Month, int Day) GetGrouping(LogMessage message) { return (message.Timestamp.Year, message.Timestamp.Month, message.Timestamp.Day); } - protected void RollFiles() + private void RollFiles() { if (_maxRetainedFiles > 0) { @@ -78,4 +78,4 @@ namespace Microsoft.Extensions.Logging.AzureAppServices.Internal } } } -} \ No newline at end of file +} diff --git a/src/Logging/Logging.AzureAppServices/src/Internal/ICloudAppendBlob.cs b/src/Logging/Logging.AzureAppServices/src/ICloudAppendBlob.cs similarity index 82% rename from src/Logging/Logging.AzureAppServices/src/Internal/ICloudAppendBlob.cs rename to src/Logging/Logging.AzureAppServices/src/ICloudAppendBlob.cs index ccca525090..98f3b34d28 100644 --- a/src/Logging/Logging.AzureAppServices/src/Internal/ICloudAppendBlob.cs +++ b/src/Logging/Logging.AzureAppServices/src/ICloudAppendBlob.cs @@ -1,4 +1,4 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; @@ -6,12 +6,12 @@ using System.IO; using System.Threading; using System.Threading.Tasks; -namespace Microsoft.Extensions.Logging.AzureAppServices.Internal +namespace Microsoft.Extensions.Logging.AzureAppServices { /// /// Represents an append blob, a type of blob where blocks of data are always committed to the end of the blob. /// - public interface ICloudAppendBlob + internal interface ICloudAppendBlob { /// /// Initiates an asynchronous operation to open a stream for writing to the blob. @@ -19,4 +19,4 @@ namespace Microsoft.Extensions.Logging.AzureAppServices.Internal /// A object of type that represents the asynchronous operation. Task AppendAsync(ArraySegment data, CancellationToken cancellationToken); } -} \ No newline at end of file +} diff --git a/src/Logging/Logging.AzureAppServices/src/Internal/IWebAppContext.cs b/src/Logging/Logging.AzureAppServices/src/IWebAppContext.cs similarity index 83% rename from src/Logging/Logging.AzureAppServices/src/Internal/IWebAppContext.cs rename to src/Logging/Logging.AzureAppServices/src/IWebAppContext.cs index 21e2982192..a888de16af 100644 --- a/src/Logging/Logging.AzureAppServices/src/Internal/IWebAppContext.cs +++ b/src/Logging/Logging.AzureAppServices/src/IWebAppContext.cs @@ -1,12 +1,12 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -namespace Microsoft.Extensions.Logging.AzureAppServices.Internal +namespace Microsoft.Extensions.Logging.AzureAppServices { /// /// Represents an Azure WebApp context /// - public interface IWebAppContext + internal interface IWebAppContext { /// /// Gets the path to the home folder if running in Azure WebApp diff --git a/src/Logging/Logging.AzureAppServices/src/Internal/ForwardingLoggerProvider.cs b/src/Logging/Logging.AzureAppServices/src/Internal/ForwardingLoggerProvider.cs deleted file mode 100644 index 0474f0ba9e..0000000000 --- a/src/Logging/Logging.AzureAppServices/src/Internal/ForwardingLoggerProvider.cs +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -namespace Microsoft.Extensions.Logging.AzureAppServices.Internal -{ - internal class ForwardingLoggerProvider : ILoggerProvider - { - private readonly ILoggerFactory _loggerFactory; - - public ForwardingLoggerProvider(ILoggerFactory loggerFactory) - { - _loggerFactory = loggerFactory; - } - - public void Dispose() - { - _loggerFactory.Dispose(); - } - - public ILogger CreateLogger(string categoryName) - { - return _loggerFactory.CreateLogger(categoryName); - } - } -} \ No newline at end of file diff --git a/src/Logging/Logging.AzureAppServices/src/Internal/LogMessage.cs b/src/Logging/Logging.AzureAppServices/src/Internal/LogMessage.cs deleted file mode 100644 index b330f4dda7..0000000000 --- a/src/Logging/Logging.AzureAppServices/src/Internal/LogMessage.cs +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using System; - -namespace Microsoft.Extensions.Logging.AzureAppServices.Internal -{ - public struct LogMessage - { - public DateTimeOffset Timestamp { get; set; } - public string Message { get; set; } - } -} \ No newline at end of file diff --git a/src/Logging/Logging.AzureAppServices/src/LogMessage.cs b/src/Logging/Logging.AzureAppServices/src/LogMessage.cs new file mode 100644 index 0000000000..460ebd8c0f --- /dev/null +++ b/src/Logging/Logging.AzureAppServices/src/LogMessage.cs @@ -0,0 +1,19 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System; + +namespace Microsoft.Extensions.Logging.AzureAppServices +{ + internal readonly struct LogMessage + { + public LogMessage(DateTimeOffset timestamp, string message) + { + Timestamp = timestamp; + Message = message; + } + + public DateTimeOffset Timestamp { get; } + public string Message { get; } + } +} diff --git a/src/Logging/Logging.AzureAppServices/src/Properties/AssemblyInfo.cs b/src/Logging/Logging.AzureAppServices/src/Properties/AssemblyInfo.cs index 85c4d7c575..83f3ffe055 100644 --- a/src/Logging/Logging.AzureAppServices/src/Properties/AssemblyInfo.cs +++ b/src/Logging/Logging.AzureAppServices/src/Properties/AssemblyInfo.cs @@ -5,3 +5,4 @@ using System.Runtime.CompilerServices; [assembly: InternalsVisibleTo("Microsoft.Extensions.Logging.AzureAppServices.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] +[assembly: InternalsVisibleTo("DynamicProxyGenAssembly2, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c547cac37abd99c8db225ef2f6c8a3602f3b3606cc9891605d02baa56104f4cfc0734aa39b93bf7852f7d9266654753cc297e7d2edfe0bac1cdcf9f717241550e0a7b191195b7667bb4f64bcb8e2121380fd1d9d46ad2d92d2d15605093924cceaf74c4861eff62abf69b9291ed0a340e113be11e6a7d3113e92484cf7045cc7")] diff --git a/src/Logging/Logging.AzureAppServices/src/Internal/SiteConfigurationProvider.cs b/src/Logging/Logging.AzureAppServices/src/SiteConfigurationProvider.cs similarity index 79% rename from src/Logging/Logging.AzureAppServices/src/Internal/SiteConfigurationProvider.cs rename to src/Logging/Logging.AzureAppServices/src/SiteConfigurationProvider.cs index b7aa39de2c..e685db2ebc 100644 --- a/src/Logging/Logging.AzureAppServices/src/Internal/SiteConfigurationProvider.cs +++ b/src/Logging/Logging.AzureAppServices/src/SiteConfigurationProvider.cs @@ -1,12 +1,12 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.IO; using Microsoft.Extensions.Configuration; -namespace Microsoft.Extensions.Logging.AzureAppServices.Internal +namespace Microsoft.Extensions.Logging.AzureAppServices { - public class SiteConfigurationProvider + internal class SiteConfigurationProvider { public static IConfiguration GetAzureLoggingConfiguration(IWebAppContext context) { @@ -19,4 +19,4 @@ namespace Microsoft.Extensions.Logging.AzureAppServices.Internal .Build(); } } -} \ No newline at end of file +} diff --git a/src/Logging/Logging.AzureAppServices/src/Internal/WebAppContext.cs b/src/Logging/Logging.AzureAppServices/src/WebAppContext.cs similarity index 85% rename from src/Logging/Logging.AzureAppServices/src/Internal/WebAppContext.cs rename to src/Logging/Logging.AzureAppServices/src/WebAppContext.cs index 774020afdb..149766f25c 100644 --- a/src/Logging/Logging.AzureAppServices/src/Internal/WebAppContext.cs +++ b/src/Logging/Logging.AzureAppServices/src/WebAppContext.cs @@ -1,14 +1,14 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; -namespace Microsoft.Extensions.Logging.AzureAppServices.Internal +namespace Microsoft.Extensions.Logging.AzureAppServices { /// /// Represents the default implementation of . /// - public class WebAppContext : IWebAppContext + internal class WebAppContext : IWebAppContext { /// /// Gets the default instance of the WebApp context. diff --git a/src/Logging/Logging.AzureAppServices/src/breakingchanges.netcore.json b/src/Logging/Logging.AzureAppServices/src/breakingchanges.netcore.json new file mode 100644 index 0000000000..7b778dd14a --- /dev/null +++ b/src/Logging/Logging.AzureAppServices/src/breakingchanges.netcore.json @@ -0,0 +1,24 @@ +[ + { + "TypeId": "public class Microsoft.Extensions.Logging.AzureAppServices.AzureAppServicesDiagnosticsSettings", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.Extensions.Logging.AzureAppServices.AzureBlobLoggerOptions : Microsoft.Extensions.Logging.AzureAppServices.Internal.BatchingLoggerOptions", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.Extensions.Logging.AzureAppServices.AzureFileLoggerOptions : Microsoft.Extensions.Logging.AzureAppServices.Internal.BatchingLoggerOptions", + "Kind": "Removal" + }, + { + "TypeId": "public static class Microsoft.Extensions.Logging.AzureAppServicesLoggerFactoryExtensions", + "MemberId": "public static Microsoft.Extensions.Logging.ILoggerFactory AddAzureWebAppDiagnostics(this Microsoft.Extensions.Logging.ILoggerFactory factory)", + "Kind": "Removal" + }, + { + "TypeId": "public static class Microsoft.Extensions.Logging.AzureAppServicesLoggerFactoryExtensions", + "MemberId": "public static Microsoft.Extensions.Logging.ILoggerFactory AddAzureWebAppDiagnostics(this Microsoft.Extensions.Logging.ILoggerFactory factory, Microsoft.Extensions.Logging.AzureAppServices.AzureAppServicesDiagnosticsSettings settings)", + "Kind": "Removal" + } +] diff --git a/src/Logging/Logging.AzureAppServices/test/AzureAppendBlobTests.cs b/src/Logging/Logging.AzureAppServices/test/AzureAppendBlobTests.cs index e9fe0b65b1..d9badcde31 100644 --- a/src/Logging/Logging.AzureAppServices/test/AzureAppendBlobTests.cs +++ b/src/Logging/Logging.AzureAppServices/test/AzureAppendBlobTests.cs @@ -1,4 +1,4 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; @@ -6,7 +6,6 @@ using System.Net; using System.Net.Http; using System.Threading; using System.Threading.Tasks; -using Microsoft.Extensions.Logging.AzureAppServices.Internal; using Xunit; namespace Microsoft.Extensions.Logging.AzureAppServices.Test diff --git a/src/Logging/Logging.AzureAppServices/test/AzureBlobSinkTests.cs b/src/Logging/Logging.AzureAppServices/test/AzureBlobSinkTests.cs index a1ee0e97d3..d8642aeae7 100644 --- a/src/Logging/Logging.AzureAppServices/test/AzureBlobSinkTests.cs +++ b/src/Logging/Logging.AzureAppServices/test/AzureBlobSinkTests.cs @@ -1,4 +1,4 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; @@ -9,7 +9,6 @@ using System.Threading; using System.Threading.Tasks; using Moq; using Xunit; -using Microsoft.Extensions.Logging.AzureAppServices.Internal; namespace Microsoft.Extensions.Logging.AzureAppServices.Test { diff --git a/src/Logging/Logging.AzureAppServices/test/AzureDiagnosticsConfigurationProviderTests.cs b/src/Logging/Logging.AzureAppServices/test/AzureDiagnosticsConfigurationProviderTests.cs index 51ba07f12b..c2bfa516d2 100644 --- a/src/Logging/Logging.AzureAppServices/test/AzureDiagnosticsConfigurationProviderTests.cs +++ b/src/Logging/Logging.AzureAppServices/test/AzureDiagnosticsConfigurationProviderTests.cs @@ -1,9 +1,8 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; using System.IO; -using Microsoft.Extensions.Logging.AzureAppServices.Internal; using Moq; using Xunit; @@ -67,4 +66,4 @@ namespace Microsoft.Extensions.Logging.AzureAppServices.Test } } } -} \ No newline at end of file +} diff --git a/src/Logging/Logging.AzureAppServices/test/BatchingLoggerProviderTests.cs b/src/Logging/Logging.AzureAppServices/test/BatchingLoggerProviderTests.cs index 9c9a42b966..a8fe9d596c 100644 --- a/src/Logging/Logging.AzureAppServices/test/BatchingLoggerProviderTests.cs +++ b/src/Logging/Logging.AzureAppServices/test/BatchingLoggerProviderTests.cs @@ -7,7 +7,6 @@ using System.Linq; using System.Text.RegularExpressions; using System.Threading; using System.Threading.Tasks; -using Microsoft.Extensions.Logging.AzureAppServices.Internal; using Xunit; namespace Microsoft.Extensions.Logging.AzureAppServices.Test @@ -121,7 +120,7 @@ namespace Microsoft.Extensions.Logging.AzureAppServices.Test { } - protected override Task WriteMessagesAsync(IEnumerable messages, CancellationToken token) + internal override Task WriteMessagesAsync(IEnumerable messages, CancellationToken token) { Batches.Add(messages.ToArray()); return Task.CompletedTask; diff --git a/src/Logging/Logging.AzureAppServices/test/ConfigureOptionsTests.cs b/src/Logging/Logging.AzureAppServices/test/ConfigureOptionsTests.cs index 077ebd726a..9d46aeb832 100644 --- a/src/Logging/Logging.AzureAppServices/test/ConfigureOptionsTests.cs +++ b/src/Logging/Logging.AzureAppServices/test/ConfigureOptionsTests.cs @@ -1,11 +1,10 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; using System.Collections.Generic; using System.IO; using Microsoft.Extensions.Configuration; -using Microsoft.Extensions.Logging.AzureAppServices.Internal; using Moq; using Xunit; diff --git a/src/Logging/Logging.AzureAppServices/test/FileLoggerTests.cs b/src/Logging/Logging.AzureAppServices/test/FileLoggerTests.cs index ea838b93cf..430f8852d8 100644 --- a/src/Logging/Logging.AzureAppServices/test/FileLoggerTests.cs +++ b/src/Logging/Logging.AzureAppServices/test/FileLoggerTests.cs @@ -5,7 +5,6 @@ using System; using System.IO; using System.Linq; using System.Threading.Tasks; -using Microsoft.Extensions.Logging.AzureAppServices.Internal; using Xunit; namespace Microsoft.Extensions.Logging.AzureAppServices.Test @@ -119,4 +118,4 @@ namespace Microsoft.Extensions.Logging.AzureAppServices.Test }, actualFiles); } } -} \ No newline at end of file +} diff --git a/src/Logging/Logging.AzureAppServices/test/LoggerBuilderExtensionsTests.cs b/src/Logging/Logging.AzureAppServices/test/LoggerBuilderExtensionsTests.cs index ddf38d0137..de148f2c3a 100644 --- a/src/Logging/Logging.AzureAppServices/test/LoggerBuilderExtensionsTests.cs +++ b/src/Logging/Logging.AzureAppServices/test/LoggerBuilderExtensionsTests.cs @@ -1,10 +1,9 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Linq; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.Logging.AzureAppServices.Internal; using Microsoft.Extensions.Options; using Moq; using Xunit; @@ -66,4 +65,4 @@ namespace Microsoft.Extensions.Logging.AzureAppServices.Test Assert.Equal(4, serviceCollection.Count(d => d.ServiceType == typeof(IConfigureOptions))); } } -} \ No newline at end of file +} diff --git a/src/Logging/Logging.AzureAppServices/test/TestBlobSink.cs b/src/Logging/Logging.AzureAppServices/test/TestBlobSink.cs index df9665e44e..23afaf1787 100644 --- a/src/Logging/Logging.AzureAppServices/test/TestBlobSink.cs +++ b/src/Logging/Logging.AzureAppServices/test/TestBlobSink.cs @@ -1,8 +1,6 @@ using System; using System.Threading; using System.Threading.Tasks; -using Microsoft.Extensions.Logging.AzureAppServices.Internal; -using Microsoft.Extensions.Options; namespace Microsoft.Extensions.Logging.AzureAppServices.Test { @@ -27,4 +25,4 @@ namespace Microsoft.Extensions.Logging.AzureAppServices.Test return IntervalControl.IntervalAsync(); } } -} \ No newline at end of file +} diff --git a/src/Logging/Logging.AzureAppServices/test/TestFileLoggerProvider.cs b/src/Logging/Logging.AzureAppServices/test/TestFileLoggerProvider.cs index 4b0b87c4e4..8350133d99 100644 --- a/src/Logging/Logging.AzureAppServices/test/TestFileLoggerProvider.cs +++ b/src/Logging/Logging.AzureAppServices/test/TestFileLoggerProvider.cs @@ -4,7 +4,6 @@ using System; using System.Threading; using System.Threading.Tasks; -using Microsoft.Extensions.Logging.AzureAppServices.Internal; namespace Microsoft.Extensions.Logging.AzureAppServices.Test { @@ -33,4 +32,4 @@ namespace Microsoft.Extensions.Logging.AzureAppServices.Test return IntervalControl.IntervalAsync(); } } -} \ No newline at end of file +} diff --git a/src/Logging/Logging.AzureAppServices/test/WebConfigurationLevelSwitchTests.cs b/src/Logging/Logging.AzureAppServices/test/WebConfigurationLevelSwitchTests.cs index afb5dc037f..c4f92115e7 100644 --- a/src/Logging/Logging.AzureAppServices/test/WebConfigurationLevelSwitchTests.cs +++ b/src/Logging/Logging.AzureAppServices/test/WebConfigurationLevelSwitchTests.cs @@ -1,9 +1,8 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Collections.Generic; using Microsoft.Extensions.Configuration; -using Microsoft.Extensions.Logging.AzureAppServices.Internal; using Xunit; namespace Microsoft.Extensions.Logging.AzureAppServices.Test