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 | 97,351 | 12/20/2023 |
5.2.0 | 51,530 | 10/15/2023 |
5.0.0 | 252,978 | 5/16/2022 |
4.7.15 | 19,575 | 3/26/2022 |
4.7.14 | 38,758 | 2/23/2022 |
4.7.13 | 15,680 | 12/5/2021 |
4.7.12 | 5,276 | 10/24/2021 |
4.7.11 | 7,148 | 8/18/2021 |
4.7.10 | 17,843 | 5/14/2021 |
4.7.9 | 6,971 | 3/24/2021 |
4.7.8 | 10,083 | 2/25/2021 |
4.7.7 | 2,537 | 1/20/2021 |
4.7.6 | 4,637 | 12/6/2020 |
4.7.5 | 11,386 | 9/27/2020 |
4.7.4 | 18,837 | 8/22/2020 |
4.7.3 | 19,376 | 7/31/2020 |
4.7.2 | 14,081 | 5/18/2020 |
4.7.1 | 751 | 5/15/2020 |
4.7.0 | 51,872 | 3/20/2020 |
4.6.8 | 19,593 | 11/4/2019 |
4.6.7 | 246,143 | 8/25/2019 |
4.6.6 | 9,197 | 7/14/2019 |
4.6.5 | 12,979 | 6/14/2019 |
4.6.4 | 1,360 | 5/28/2019 |
4.6.3 | 1,276 | 4/30/2019 |
4.6.2 | 23,051 | 4/2/2019 |
4.6.1 | 5,063 | 3/29/2019 |
4.6.0 | 1,525 | 3/21/2019 |
4.5.11 | 23,749 | 11/6/2018 |
4.5.10 | 1,076 | 9/17/2018 |
4.5.9 | 1,036 | 8/24/2018 |
4.5.8 | 926 | 8/5/2018 |
4.5.6 | 1,113 | 5/29/2018 |
4.5.5 | 987 | 5/25/2018 |
4.5.4 | 1,093 | 5/5/2018 |
4.5.3 | 1,183 | 4/16/2018 |
4.5.2 | 992 | 4/6/2018 |
4.5.1 | 1,108 | 4/3/2018 |
4.5.0 | 1,377 | 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