Atatus.NLog.Targets
1.0.0
dotnet add package Atatus.NLog.Targets --version 1.0.0
NuGet\Install-Package Atatus.NLog.Targets -Version 1.0.0
<PackageReference Include="Atatus.NLog.Targets" Version="1.0.0" />
<PackageVersion Include="Atatus.NLog.Targets" Version="1.0.0" />
<PackageReference Include="Atatus.NLog.Targets" />
paket add Atatus.NLog.Targets --version 1.0.0
#r "nuget: Atatus.NLog.Targets, 1.0.0"
#:package Atatus.NLog.Targets@1.0.0
#addin nuget:?package=Atatus.NLog.Targets&version=1.0.0
#tool nuget:?package=Atatus.NLog.Targets&version=1.0.0
Atatus.NLog.Targets
An NLog target that ships logs directly to Atatus via the Atatus Logs Ingest API.
Packages
The .NET assemblies are published to NuGet under the package name Atatus.NLog.Targets
How to use from API
var config = new LoggingConfiguration();
var atatusTarget = new AtatusTarget { LicenseKey = "<your-ingest-license-key>", AppName = "my-service" };
config.AddRule(LogLevel.Debug, LogLevel.Fatal, atatusTarget);
LogManager.Configuration = config;
var logger = LogManager.GetCurrentClassLogger();
How to use from NLog.config
<nlog>
<extensions>
<add assembly="Atatus.NLog.Targets"/>
</extensions>
<targets>
<target name="atatus" type="Atatus" licenseKey="${environment:ATATUS_INGEST_LICENSE_KEY}" appName="my-service" />
</targets>
<rules>
<logger name="*" minLevel="Debug" writeTo="atatus" />
</rules>
</nlog>
Trace correlation
Each log event is automatically tagged with trace correlation fields when available:
- If the Atatus APM agent is configured in this process,
txnId,traceId,spanId, andparentIdare taken from its current transaction/span. - Otherwise, if there's a current
System.Diagnostics.Activity(e.g. from OpenTelemetry instrumentation),traceId,spanId, andparentIdare taken from it.txnIdhas no equivalent outside the Atatus agent, so it's omitted. - If neither is present, none of these fields are sent.
AtatusTarget Parameter Options
- LicenseKey - Ingest API key. Falls back to the
ATATUS_INGEST_LICENSE_KEYenvironment variable, then the co-located Atatus agent's license key, if configured. - AppName - Application/service name reported alongside each log. Falls back to the
ATATUS_APP_NAMEenvironment variable, then the co-located Atatus agent's app name. - Endpoint - Ingest API base URL. Falls back to the
ATATUS_SERVER_URLenvironment variable, then the co-located Atatus agent's server URL, then the default ingest host. - Source - Log source label sent to the ingest API. Default =
dotnet. - Hostname - Host label sent to the ingest API. Default = the machine name.
- FlushIntervalSeconds - How often queued log lines are batched and posted to the ingest API. Default =
5. - Layout - Standard NLog
Layoutused to render each log line before sending. Default = NLog's standard layout.
Notice that export depends on an in-memory queue that is flushed every 5 seconds and is lost on application-crash / -exit.
Copyright and License
This software is Copyright (c) 2014-2020 by Elasticsearch BV.
This is free software, licensed under: The Apache License Version 2.0.
| Product | Versions 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 is compatible. 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 is compatible. |
| .NET Framework | net461 was computed. net462 was computed. 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. |
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 | 51 | 7/10/2026 |