Microsoft.Extensions.Logging.AzureAppServices 10.0.0-preview.5.25266.103

Prefix Reserved
This is a prerelease version of Microsoft.Extensions.Logging.AzureAppServices.
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package Microsoft.Extensions.Logging.AzureAppServices --version 10.0.0-preview.5.25266.103
                    
NuGet\Install-Package Microsoft.Extensions.Logging.AzureAppServices -Version 10.0.0-preview.5.25266.103
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Microsoft.Extensions.Logging.AzureAppServices" Version="10.0.0-preview.5.25266.103" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Microsoft.Extensions.Logging.AzureAppServices" Version="10.0.0-preview.5.25266.103" />
                    
Directory.Packages.props
<PackageReference Include="Microsoft.Extensions.Logging.AzureAppServices" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Microsoft.Extensions.Logging.AzureAppServices --version 10.0.0-preview.5.25266.103
                    
#r "nuget: Microsoft.Extensions.Logging.AzureAppServices, 10.0.0-preview.5.25266.103"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Microsoft.Extensions.Logging.AzureAppServices@10.0.0-preview.5.25266.103
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Microsoft.Extensions.Logging.AzureAppServices&version=10.0.0-preview.5.25266.103&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Microsoft.Extensions.Logging.AzureAppServices&version=10.0.0-preview.5.25266.103&prerelease
                    
Install as a Cake Tool

About

Microsoft.Extensions.Logging.AzureAppServices provides a logger implementation that logs to text files in an Azure App Service app's file system and to blob storage in an Azure Storage account.

Key Features

  • Loging messages with the "Diagnostics Logger" and "Log Streaming" features of Azure App Service
  • Integration with Azure App Service logging infrastructure
  • Seamless integration with other components of Microsoft.Extensions.Logging

How to Use

To use Microsoft.Extensions.Logging.AzureAppServices, follow these steps:

Installation

dotnet add package Microsoft.Extensions.Logging.AzureAppServices

Configuration

To configure provider settings, use AzureFileLoggerOptions and AzureBlobLoggerOptions, as shown in the following example:

using Microsoft.Extensions.Logging.AzureAppServices;

var builder = WebApplication.CreateBuilder();
builder.Logging.AddAzureWebAppDiagnostics();
builder.Services.Configure<AzureFileLoggerOptions>(options =>
{
    options.FileName = "azure-diagnostics-";
    options.FileSizeLimit = 50 * 1024;
    options.RetainedFileCountLimit = 5;
});
builder.Services.Configure<AzureBlobLoggerOptions>(options =>
{
    options.BlobName = "log.txt";
});

Main Types

  • FileLoggerProvider: A BatchingLoggerProvider which writes out to a file
  • BlobLoggerProvider: The ILoggerProvider implementation that stores messages by appending them to Azure Blob in batches
  • AzureFileLoggerOptions: Options for configuring Azure diagnostics file logging
  • AzureBlobLoggerOptions: Options for configuring Azure diagnostics blob logging

Additional Documentation

For additional documentation and examples, refer to the official documentation on logging with ASP.NEt Core and Azure App Service.

Feedback & Contributing

Microsoft.Extensions.Logging.AzureAppServices is released as open-source under the MIT license. Bug reports and contributions are welcome at the GitHub repository.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 is compatible.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

GitHub repositories (14)

Showing the top 14 popular GitHub repositories that depend on Microsoft.Extensions.Logging.AzureAppServices:

Repository Stars
dotnet/AspNetCore.Docs
Documentation for ASP.NET Core
microsoft/ailab
Experience, Learn and Code the latest breakthrough innovations with Microsoft AI
phongnguyend/Practical.CleanArchitecture
Full-stack .Net 9 Clean Architecture (Microservices, Modular Monolith, Monolith), Blazor, Angular 20, React 19, Vue 3.5, BFF with YARP, NextJs 15, Domain-Driven Design, CQRS, SOLID, Asp.Net Core Identity Custom Storage, OpenID Connect, EF Core, OpenTelemetry, SignalR, Background Services, Health Checks, Rate Limiting, Clouds (Azure, AWS, GCP), ..
VirtoCommerce/vc-platform
Virto Commerce B2B Innovation Platform
EdiWang/Moonglade
Blog system of https://edi.wang, runs on Microsoft Azure
ProfessionalCSharp/ProfessionalCSharp7
Code samples for the book Professional C# 7 and .NET Core 2.0 (with updates for 2.1), Wrox Press
microsoft/BotFramework-BlogSamples
Welcome to the Bot Framework samples repository. Here you will find sample bots that take advantage of Bot Framework capabilities.
ProfessionalCSharp/ProfessionalCSharp2021
Source code for Professional C# and .NET 2021 Edition (with updates for C# 11 and .NET 7)
BotBuilderCommunity/botbuilder-community-dotnet
Part of the Bot Builder Community Project. Repository for extensions for the Bot Builder .NET SDK, including middleware, dialogs, recognizers and more.
ProfessionalCSharp/MoreSamples
Additional code samples the book series Professional C#, Wrox Press
VirtoCommerce/vc-storefront
Virto Commerce Storefront - ASP.NET Core 8.0
microsoft/app-innovation-workshop
Hands-on workshop designed to help you learn Azure, Mobile & AI
DevBetterCom/DevBetterWeb
A simple web application for devBetter
tompaana/intermediator-bot-sample
A sample bot, built with the Microsoft Bot Framework (v4), that routes messages between two users on different channels.