NLog.IndentException 0.1.9

dotnet add package NLog.IndentException --version 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.
<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.
<PackageVersion Include="NLog.IndentException" Version="0.1.9" />
                    
Directory.Packages.props
<PackageReference Include="NLog.IndentException" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version 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 and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package NLog.IndentException@0.1.9
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=NLog.IndentException&version=0.1.9
                    
Install as a Cake Addin
#tool nuget:?package=NLog.IndentException&version=0.1.9
                    
Install as a Cake Tool
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 4,100 3/7/2019
0.1.7 819 2/15/2019
0.1.6 1,082 1/15/2019
0.1.5 1,143 1/14/2019

.Net standard project format is supported