NLog.WindowsIdentity
5.3.0
Prefix Reserved
dotnet add package NLog.WindowsIdentity --version 5.3.0
NuGet\Install-Package NLog.WindowsIdentity -Version 5.3.0
<PackageReference Include="NLog.WindowsIdentity" Version="5.3.0" />
paket add NLog.WindowsIdentity --version 5.3.0
#r "nuget: NLog.WindowsIdentity, 5.3.0"
// Install NLog.WindowsIdentity as a Cake Addin #addin nuget:?package=NLog.WindowsIdentity&version=5.3.0 // Install NLog.WindowsIdentity as a Cake Tool #tool nuget:?package=NLog.WindowsIdentity&version=5.3.0
NLog.WindowsIdentity
NLog extensions for displaying User Windows Identity and target wrapper for user impersonation
How to install
Install the package
Install-Package NLog.WindowsIdentity
or in your csproj:<PackageReference Include="NLog.WindowsIdentity" Version="5.*" />
Add to your nlog.config:
<extensions> <add assembly="NLog.WindowsIdentity"/> </extensions>
Alternative register from code using fluent configuration API:
LogManager.Setup().SetupExtensions(ext => { ext.RegisterTarget<NLog.Targets.Wrappers.ImpersonatingTargetWrapper>(); ext.RegisterLayoutRenderer<NLog.LayoutRenderers.WindowsIdentityLayoutRenderer>(); });
Example of Windows Identity UserName
Example of NLog.config
-file that outputs Windows Identity UserName:
<nlog>
<extensions>
<add assembly="NLog.WindowsIdentity"/>
</extensions>
<targets>
<target name="console" xsi:type="console" layout="${message}|User=${windows-identity}" />
</targets>
<rules>
<logger minLevel="Info" writeTo="console" />
</rules>
</nlog>
Example of Impersonating Windows Identity
Example of NLog.config
-file that apply ImpersonatingWrapper:
<nlog>
<extensions>
<add assembly="NLog.WindowsIdentity"/>
</extensions>
<targets>
<target name="userConsole" xsi:type="ImpersonatingWrapper" userName="xxx">
<target name="console" xsi:type="console" layout="${message}|User=${windows-identity}" />
</target>
</targets>
<rules>
<logger minLevel="Info" writeTo="userConsole" />
</rules>
</nlog>
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 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. |
.NET Core | netcoreapp1.0 was computed. netcoreapp1.1 was computed. netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard1.5 is compatible. netstandard1.6 was computed. netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net35 is compatible. net40 was computed. net403 was computed. net45 is compatible. net451 was computed. net452 was computed. net46 is compatible. 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 | tizen30 was computed. 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. |
-
.NETFramework 3.5
- NLog (>= 5.2.2)
-
.NETFramework 4.5
- NLog (>= 5.2.2)
-
.NETFramework 4.6
- NLog (>= 5.2.2)
-
.NETStandard 1.5
- NETStandard.Library (>= 1.6.0)
- NLog (>= 5.2.2)
- System.Security.Principal.Windows (>= 4.3.0)
-
.NETStandard 2.0
- NLog (>= 5.2.2)
- System.Security.Principal.Windows (>= 4.5.0)
NuGet packages (3)
Showing the top 3 NuGet packages that depend on NLog.WindowsIdentity:
Package | Downloads |
---|---|
NLog.Raygun.AspNetCore
A custom NLog target for Asp .Net Core projects to push exceptions into Raygun |
|
Poc.Log.Library
Modelo de dominio para a gravacao de logs seja um banco de dados sql, nsql ou ate mesmo arquivos de texto |
|
faranam.utils.core
Package Description |
GitHub repositories (1)
Showing the top 1 popular GitHub repositories that depend on NLog.WindowsIdentity:
Repository | Stars |
---|---|
NLog/NLog
NLog - Advanced and Structured Logging for Various .NET Platforms
|
Version | Downloads | Last updated |
---|---|---|
5.3.0 | 88,299 | 12/20/2023 |
5.2.0 | 49,042 | 10/15/2023 |
5.0.0 | 247,102 | 5/16/2022 |
4.7.15 | 19,329 | 3/26/2022 |
4.7.14 | 38,750 | 2/23/2022 |
4.7.13 | 15,665 | 12/5/2021 |
4.7.12 | 5,250 | 10/24/2021 |
4.7.11 | 6,945 | 8/18/2021 |
4.7.10 | 17,765 | 5/14/2021 |
4.7.9 | 6,906 | 3/24/2021 |
4.7.8 | 9,963 | 2/25/2021 |
4.7.7 | 2,485 | 1/20/2021 |
4.7.6 | 4,615 | 12/6/2020 |
4.7.5 | 11,360 | 9/27/2020 |
4.7.4 | 18,760 | 8/22/2020 |
4.7.3 | 18,918 | 7/31/2020 |
4.7.2 | 13,789 | 5/18/2020 |
4.7.1 | 749 | 5/15/2020 |
4.7.0 | 51,249 | 3/20/2020 |
4.6.8 | 19,488 | 11/4/2019 |
4.6.7 | 243,282 | 8/25/2019 |
4.6.6 | 9,193 | 7/14/2019 |
4.6.5 | 12,972 | 6/14/2019 |
4.6.4 | 1,356 | 5/28/2019 |
4.6.3 | 1,272 | 4/30/2019 |
4.6.2 | 22,743 | 4/2/2019 |
4.6.1 | 5,059 | 3/29/2019 |
4.6.0 | 1,521 | 3/21/2019 |
4.5.11 | 23,625 | 11/6/2018 |
4.5.10 | 1,069 | 9/17/2018 |
4.5.9 | 1,029 | 8/24/2018 |
4.5.8 | 920 | 8/5/2018 |
4.5.6 | 1,109 | 5/29/2018 |
4.5.5 | 983 | 5/25/2018 |
4.5.4 | 1,089 | 5/5/2018 |
4.5.3 | 1,179 | 4/16/2018 |
4.5.2 | 988 | 4/6/2018 |
4.5.1 | 1,104 | 4/3/2018 |
4.5.0 | 1,365 | 3/25/2018 |
Windows-Identity LayoutRenderer Docs:
- https://github.com/NLog/NLog/wiki/Windows-Identity-Layout-Renderer
ImpersonatingWrapper Target Docs:
- https://github.com/NLog/NLog/wiki/ImpersonatingWrapper-target