Starhead.LogEvent 1.0.0

dotnet add package Starhead.LogEvent --version 1.0.0
                    
NuGet\Install-Package Starhead.LogEvent -Version 1.0.0
                    
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="Starhead.LogEvent" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Starhead.LogEvent" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Starhead.LogEvent" />
                    
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 Starhead.LogEvent --version 1.0.0
                    
#r "nuget: Starhead.LogEvent, 1.0.0"
                    
#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 Starhead.LogEvent@1.0.0
                    
#: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=Starhead.LogEvent&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Starhead.LogEvent&version=1.0.0
                    
Install as a Cake Tool

Starhead.LogEvent

Client wrapper for the Starhead Trace External API (/ext/api/v1) — send and query error, user activity, audit trail, and payment events. Handles the three required authentication headers (x-api-key, x-timestamp, x-signature, HMAC-SHA512 signed) transparently on every request.

Installation

dotnet add package Starhead.LogEvent

Usage with dependency injection

services.AddStarheadLogClient(options =>
{
    options.BaseUrl = "https://trace.starhead.example";
    options.ApiKey = "your-api-key";
    options.SecretKey = "your-secret-key";
});

StarheadLogClient is registered as a typed HttpClient, so it benefits from IHttpClientFactory pooling. Inject it wherever needed:

public class MyService(StarheadLogClient logClient)
{
    public Task LogAsync(AuditTrailEvent e, CancellationToken ct) =>
        logClient.LogAuditTrailAsync(e, ct);
}

Usage without DI

var client = new StarheadLogClient(
    baseUrl: "https://trace.starhead.example",
    apiKey: "your-api-key",
    secretKey: "your-secret-key");

Event types

Event Log Get by ID List / filter
ErrorEvent LogErrorAsync GetErrorByIdAsync GetErrorsAsync(ErrorFilter?)
UserActivityEvent LogUserActivityAsync GetUserActivityByIdAsync GetUserActivitiesAsync(UserActivityFilter?)
AuditTrailEvent LogAuditTrailAsync GetAuditTrailByIdAsync GetAuditTrailsAsync(AuditTrailFilter?)
PaymentEvent LogPaymentAsync GetPaymentByIdAsync GetPaymentsAsync(PaymentFilter?)

List methods return a PagedResult<T> (Data, Page, PageSize, Total, TotalPages). Every filter supports ApplicationName, From/To (UTC date range), Page, and PageSize, plus event-specific fields (e.g. ErrorFilter.Severity, AuditTrailFilter.ActionType).

Example — log an audit trail event

await logClient.LogAuditTrailAsync(new AuditTrailEvent
{
    AuditId = Guid.NewGuid(),
    ApplicationName = "MyApp",
    EventTime = DateTime.UtcNow,
    UserId = "user-123",
    ActionType = "Update",
    EntityType = "Order",
    EntityId = "ORD-001",
    BeforeState = "{...}",
    AfterState = "{...}",
});

Example — query error events

var result = await logClient.GetErrorsAsync(new ErrorFilter
{
    ApplicationName = "MyApp",
    Severity = "Critical",
    From = DateTime.UtcNow.AddDays(-7),
});

Error handling

Non-success responses throw StarheadLogException, which carries the response's HttpStatusCode and body.

Requirements

  • .NET 10.0
Product Compatible and additional computed target framework versions.
.NET 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0 123 7/15/2026 1.0.0 is deprecated because it is no longer maintained and has critical bugs.