<PackageReference Include="NLog" Version="6.2.0" />

NLog.LayoutRenderers.EnvironmentUserLayoutRenderer

Thread identity information (username).
public string DefaultDomain { get; set; }

Gets or sets the default value to be used when the Domain is not set.

public string DefaultUser { get; set; }

Gets or sets the default value to be used when the User is not set.

public bool Domain { get; set; }

Gets or sets a value indicating whether domain name should be included.

public bool UserName { get; set; }

Gets or sets a value indicating whether username should be included.