logsnag - LogSnag.NET.Extensions.Microsoft.DependencyInjection 1.0.0-beta1
LogSnag extensions for ASP.NET Core
PM> Install-Package LogSnag.NET.Extensions.Microsoft.DependencyInjection -Version 1.0.0-beta1 -Source https://www.myget.org/F/logsnag/api/v3/index.json
> nuget.exe install LogSnag.NET.Extensions.Microsoft.DependencyInjection -Version 1.0.0-beta1 -Source https://www.myget.org/F/logsnag/api/v3/index.json
> dotnet add package LogSnag.NET.Extensions.Microsoft.DependencyInjection --version 1.0.0-beta1 --source https://www.myget.org/F/logsnag/api/v3/index.json
<PackageReference Include="LogSnag.NET.Extensions.Microsoft.DependencyInjection" Version="1.0.0-beta1" />
Copy to clipboard
source https://www.myget.org/F/logsnag/api/v3/index.json
nuget LogSnag.NET.Extensions.Microsoft.DependencyInjection ~> 1.0.0-beta1
Copy to clipboard
> choco install LogSnag.NET.Extensions.Microsoft.DependencyInjection --version 1.0.0-beta1 --source https://www.myget.org/F/logsnag/api/v2
Import-Module PowerShellGet
Register-PSRepository -Name "logsnag" -SourceLocation "https://www.myget.org/F/logsnag/api/v2"
Install-Module -Name "LogSnag.NET.Extensions.Microsoft.DependencyInjection" -RequiredVersion "1.0.0-beta1" -Repository "logsnag" -AllowPreRelease
Copy to clipboard
Browse the sources in this package using Visual Studio or WinDbg by configuring the following symbol server URL: https://www.myget.org/F/logsnag/api/v2/symbolpackage/
LogSnag.NET
LogSnag client for .NET
Package | NuGet | MyGet (Pre-Releases) |
---|---|---|
LogSnag.NET | ||
LogSnag.NET.Extensions.Microsoft.DependencyInjection |
Install
You should install with NuGet:
Install-Package LogSnag.NET
Or via the .NET Core command line interface:
dotnet add package LogSnag.NET
How to use
ILogSnagClient client = new LogSnagClient("token");
Or with your own HttpClient
ILogSnagClient client = new LogSnagClient(new HttpClient(), "token");
Publish event
await client.Publish(new LogSnagEvent("project", "channel", "event")
{
Tags =
{
new LogSnagTag("tag-one", 1),
new LogSnagTag("tag-two", "val2"),
new LogSnagTag("tag-bool", true)
},
Icon = "🫡",
Description = "This is an event",
Notify = true,
Parser = LogSnagParser.Text
});
Publish insight
await client.Insight(new LogSnagInsight("project", "title", "value")
{
Icon = "👌"
});
Dependency Injection (IHttpClientFactory
)
Given you're in an application environment with access to an IServiceCollection
container you can use this package instead:
dotnet add package LogSnag.NET.Extensions.Microsoft.DependencyInjection
Which allows one to register ILogSnagClient
coupled to a managed HttpClient:
builder.Services.AddLogSnagClient("token");
- .NETStandard 2.0: 2.0.0.0
Ownersjoaopedro.correia |
AuthorsJoao Correia |
Project URLhttps://github.com/joaope/logsnag.net |
LicenseUnknown |
Tagslogsnag httpclient logging di dependencyinjection asp core |
Info0 total downloads |
0 downloads for version 1.0.0-beta1 |
Download (8.51 KB) |
Download symbols (6.82 KB) |
Found on the current feed only |
Package history
Version | Size | Last updated | Downloads | Mirrored? | |||
---|---|---|---|---|---|---|---|
1.0.0-beta1 | 8.51 KB | Mon, 02 Jan 2023 03:05:12 GMT | 0 |