NLog.IndentException 0.1.9

NuGet\Install-Package NLog.IndentException -Version 0.1.9
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.
dotnet add package NLog.IndentException --version 0.1.9
<PackageReference Include="NLog.IndentException" Version="0.1.9" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add NLog.IndentException --version 0.1.9
#r "nuget: NLog.IndentException, 0.1.9"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install NLog.IndentException as a Cake Addin
#addin nuget:?package=NLog.IndentException&version=0.1.9

// Install NLog.IndentException as a Cake Tool
#tool nuget:?package=NLog.IndentException&version=0.1.9
console log sample

Here is console output for layout like layout="${level} ${message}${onexception:${newline}${IndentException:LogStack=false:separator=&#x9;:beforeType=:aftertype=}}" there is no stack trace shown (because of LogStack=false)

Error tryException failure
        ArgumentException       outer exception
        KeyNotFoundException    innerException
Error failed to start NLogTest
        ArgumentException       bad try
        ArgumentException       outer exception
        KeyNotFoundException    innerException
file log sample

Below you can find file logging sample using layout layout="[${threadid}] ${longdate} ${level} (${logger}) ${message}${onexception:${newline}${IndentException}}

outer exception and inner exception stack trace is logged only once. Error type and message are logged only if error processing code tries to log the same exception second time

[1] 2019-01-27 19:56:57.7258 Debug (YourNamespace.NLog.Extention.Test.Program) starting
[1] 2019-01-27 19:56:57.7769 Error (YourNamespace.NLog.Extention.Test.Classes.UnitOfWork) tryException failure
	[ArgumentException] outer exception
		at YourNamespace.NLog.Extention.Test.Classes.UnitOfWork.outerException()
		at YourNamespace.NLog.Extention.Test.Classes.UnitOfWork.tryException()
	[KeyNotFoundException] innerException
		at YourNamespace.NLog.Extention.Test.Classes.UnitOfWork.innerException()
		at YourNamespace.NLog.Extention.Test.Classes.UnitOfWork.outerException()
[1] 2019-01-27 19:56:57.7769 Error (YourNamespace.NLog.Extention.Test.Program) failed to start NLogTest
	[ArgumentException] bad try
		at YourNamespace.NLog.Extention.Test.Classes.UnitOfWork.tryException()
		at YourNamespace.NLog.Extention.Test.Program.Main(String[] args)
	[ArgumentException] outer exception
	[KeyNotFoundException] innerException
[1] 2019-01-27 19:56:57.8344 Debug (YourNamespace.NLog.Extention.Test.Program) the end
There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.1.9 2,215 3/7/2019
0.1.7 466 2/15/2019
0.1.6 674 1/15/2019
0.1.5 699 1/14/2019

.Net standard project format is supported