NLog.WindowsIdentity 5.3.0

The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org. Prefix Reserved
dotnet add package NLog.WindowsIdentity --version 5.3.0
NuGet\Install-Package NLog.WindowsIdentity -Version 5.3.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="NLog.WindowsIdentity" Version="5.3.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add NLog.WindowsIdentity --version 5.3.0
#r "nuget: NLog.WindowsIdentity, 5.3.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.
// 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

Version AppVeyor

How to install

  1. Install the package

    Install-Package NLog.WindowsIdentity or in your csproj:

    <PackageReference Include="NLog.WindowsIdentity" Version="5.*" />
    
  2. 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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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 13,913 12/20/2023
5.2.0 21,933 10/15/2023
5.0.0 186,944 5/16/2022
4.7.15 16,855 3/26/2022
4.7.14 38,624 2/23/2022
4.7.13 15,065 12/5/2021
4.7.12 4,608 10/24/2021
4.7.11 6,224 8/18/2021
4.7.10 16,817 5/14/2021
4.7.9 6,381 3/24/2021
4.7.8 9,056 2/25/2021
4.7.7 2,347 1/20/2021
4.7.6 4,203 12/6/2020
4.7.5 11,106 9/27/2020
4.7.4 18,453 8/22/2020
4.7.3 10,749 7/31/2020
4.7.2 9,370 5/18/2020
4.7.1 693 5/15/2020
4.7.0 44,310 3/20/2020
4.6.8 18,299 11/4/2019
4.6.7 206,866 8/25/2019
4.6.6 9,136 7/14/2019
4.6.5 12,536 6/14/2019
4.6.4 1,324 5/28/2019
4.6.3 1,227 4/30/2019
4.6.2 19,124 4/2/2019
4.6.1 5,011 3/29/2019
4.6.0 1,480 3/21/2019
4.5.11 22,972 11/6/2018
4.5.10 1,030 9/17/2018
4.5.9 979 8/24/2018
4.5.8 892 8/5/2018
4.5.6 1,077 5/29/2018
4.5.5 956 5/25/2018
4.5.4 1,057 5/5/2018
4.5.3 1,151 4/16/2018
4.5.2 961 4/6/2018
4.5.1 1,073 4/3/2018
4.5.0 1,219 3/25/2018