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                
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 80,421 12/20/2023
5.2.0 46,931 10/15/2023
5.0.0 242,003 5/16/2022
4.7.15 19,137 3/26/2022
4.7.14 38,735 2/23/2022
4.7.13 15,642 12/5/2021
4.7.12 5,224 10/24/2021
4.7.11 6,891 8/18/2021
4.7.10 17,697 5/14/2021
4.7.9 6,864 3/24/2021
4.7.8 9,899 2/25/2021
4.7.7 2,439 1/20/2021
4.7.6 4,579 12/6/2020
4.7.5 11,345 9/27/2020
4.7.4 18,737 8/22/2020
4.7.3 18,516 7/31/2020
4.7.2 13,524 5/18/2020
4.7.1 746 5/15/2020
4.7.0 50,442 3/20/2020
4.6.8 19,429 11/4/2019
4.6.7 240,742 8/25/2019
4.6.6 9,190 7/14/2019
4.6.5 12,967 6/14/2019
4.6.4 1,353 5/28/2019
4.6.3 1,268 4/30/2019
4.6.2 22,404 4/2/2019
4.6.1 5,056 3/29/2019
4.6.0 1,518 3/21/2019
4.5.11 23,565 11/6/2018
4.5.10 1,066 9/17/2018
4.5.9 1,024 8/24/2018
4.5.8 917 8/5/2018
4.5.6 1,106 5/29/2018
4.5.5 980 5/25/2018
4.5.4 1,086 5/5/2018
4.5.3 1,176 4/16/2018
4.5.2 985 4/6/2018
4.5.1 1,101 4/3/2018
4.5.0 1,351 3/25/2018