![]() |
VOOZH | about |
dotnet add package Southport.Azure.Functions.Extensions --version 10.0.2
NuGet\Install-Package Southport.Azure.Functions.Extensions -Version 10.0.2
<PackageReference Include="Southport.Azure.Functions.Extensions" Version="10.0.2" />
<PackageVersion Include="Southport.Azure.Functions.Extensions" Version="10.0.2" />Directory.Packages.props
<PackageReference Include="Southport.Azure.Functions.Extensions" />Project file
paket add Southport.Azure.Functions.Extensions --version 10.0.2
#r "nuget: Southport.Azure.Functions.Extensions, 10.0.2"
#:package Southport.Azure.Functions.Extensions@10.0.2
#addin nuget:?package=Southport.Azure.Functions.Extensions&version=10.0.2Install as a Cake Addin
#tool nuget:?package=Southport.Azure.Functions.Extensions&version=10.0.2Install as a Cake Tool
A .NET library providing execution logging, monitoring, and utility extensions for Azure Functions (Isolated Worker model).
FunctionBase<TService> with built-in exception handling, logging, and concurrent execution preventiondotnet add package Southport.Azure.Functions.Extensions
var host = new HostBuilder()
.ConfigureFunctionsWebApplication()
.ConfigureServices((context, services) =>
{
var config = context.Configuration;
var connectionString = config["SqlConnectionString"];
// Register your SQL connection factory
services.AddScoped<ISqlConnectionFactory, YourSqlConnectionFactory>();
// Add execution logging with Serilog
services.AddExecutionLoggerStandardServices<ISqlConnectionFactory>(connectionString);
// Optional: Add queue services
services.AddQueueServices();
// Optional: Add health checks
services.AddHealthCheckServices(connectionString);
})
.Build();
public class MyTimerFunction : FunctionBase<IMyService>
{
public MyTimerFunction(IMyService service, IExecutionLogger executionLogger, ILogger<MyTimerFunction> logger)
: base(service, executionLogger, logger)
{
}
[Function(nameof(MyTimerFunction))]
public async Task Run([TimerTrigger("0 */5 * * * *")] TimerInfo timer, FunctionContext context)
{
async Task<ExecutionResult> Function()
{
// Your business logic here
await Service.DoWorkAsync();
return ExecutionResult.Success();
}
await Run(context, Function);
}
}
// Success
return ExecutionResult.Success();
// Success with warnings
return ExecutionResult.SuccessWithWarnings("Some items were skipped");
// Failure
return ExecutionResult.Fail("Operation failed: " + errorMessage);
For high-frequency functions where you only want to log failures:
await RunLogOnlyOnError(context, Function);
Create the required tables in your SQL Server database:
CREATE TABLE [dbo].[ExecutionLog] (
[Id] nvarchar(100) NOT NULL PRIMARY KEY,
[Function] nvarchar(50) NOT NULL,
[Start] datetime2(2) NOT NULL,
[End] datetime2(2) NULL,
[TriggerValue] nvarchar(max) NULL,
[StatusCode] smallint NULL
);
CREATE INDEX [IX_Execution_End] ON [dbo].[ExecutionLog] ([End]);
CREATE INDEX [IX_Execution_Function] ON [dbo].[ExecutionLog] ([Function]);
CREATE INDEX [IX_Execution_Start] ON [dbo].[ExecutionLog] ([Start]);
CREATE INDEX [IX_Execution_StatusCode] ON [dbo].[ExecutionLog] ([StatusCode]);
CREATE TABLE [dbo].[ApplicationLog] (
[Id] int IDENTITY(1,1) NOT NULL PRIMARY KEY,
[Message] nvarchar(max) NULL,
[MessageTemplate] nvarchar(max) NULL,
[Level] nvarchar(128) NULL,
[TimeStamp] datetimeoffset(7) NOT NULL,
[Exception] nvarchar(max) NULL,
[Function] nvarchar(100) NULL,
[Source] nvarchar(250) NULL,
[LogEvent] nvarchar(max) NULL,
[ExecutionLogId] nvarchar(100) NULL
);
CREATE INDEX [IX_ExecutionId] ON [dbo].[ApplicationLog] ([ExecutionLogId]);
{
"ExecutionLogging": {
"Schema": "dbo",
"ExecutionLogTable": "ExecutionLog",
"ApplicationLogTable": "ApplicationLog",
"ApplicationLogSource": "My Function App",
"ExecutionExpirationSeconds": 3600
}
}
{
"ExecutionDigest": {
"FromAddress": "noreply@example.com",
"Company": "My Company",
"ApplicationName": "My App"
}
}
| Service | Description |
|---|---|
IExecutionLogger |
Tracks function execution lifecycle |
ILogMaintenanceService |
Cleans up expired execution logs |
IExecutionLogDigestService |
Sends email digests for failed executions |
IRequeuerService |
Moves messages from poison queues back to main queues |
IQueueClientFactory |
Creates Azure Storage Queue clients |
| Code | Value | Description |
|---|---|---|
Success |
0 | Function completed successfully |
SuccessWithWarnings |
1 | Function completed with warnings |
Failed |
2 | Function failed |
Copyright © Southport Solutions, LLC. All rights reserved.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 net10.0 is compatible. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
This package is not used by any NuGet packages.
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated | |
|---|---|---|---|
| 10.0.2 | 157 | 2/6/2026 | |
| 10.0.1 | 188 | 2/4/2026 | |
| 10.0.0 | 175 | 1/2/2026 | |
| 8.0.0 | 349 | 8/23/2024 | 8.0.0 is deprecated because it is no longer maintained. |
| 2.3.0 | 256 | 2/18/2024 | |
| 2.2.6 | 766 | 11/16/2023 | |
| 2.2.5 | 547 | 8/30/2023 | |
| 2.2.4 | 282 | 8/28/2023 | |
| 2.2.3 | 654 | 3/14/2023 | |
| 2.2.2 | 593 | 2/18/2023 | |
| 2.2.1 | 431 | 2/18/2023 | |
| 2.1.3 | 421 | 2/16/2023 | |
| 2.1.2 | 515 | 1/30/2023 | |
| 2.1.1 | 601 | 12/29/2022 | |
| 2.1.0 | 445 | 12/29/2022 | |
| 2.0.3 | 546 | 12/16/2022 | |
| 2.0.2 | 481 | 12/15/2022 | |
| 2.0.1 | 471 | 12/15/2022 |
Update to net10.