Skip to content

Wrapper to log4net to provide demystified exceptions in messages

License

Notifications You must be signed in to change notification settings

MNie/Log4Net.Demystifier

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Log4Net.Demystifier NuGet Pre Release

Unmangle the names of async and iterator methods in exception stack traces using @benaadams's Demystifier via custom LogManager which wraps your ILog.

How to Install/Configure?

Install from nuget:

Install-Package Log4Net.Demystifier

Configure via your favourite DI container. For example in StructureMap:

For<ILog>().Use(DemystifiedLogManager.GetLogger("AppLogger"));

Demystify log manager would wrap your logger via demystified logger.

Troubleshooting

If you encounter problem in old csproj based project(s), because of referencing .net standard library to a .net framework based project. You have to:

  1. add RestoreProjectStyle element to csproj
<PropertyGroup>
  <RestoreProjectStyle>PackageReference</RestoreProjectStyle>
</PropertyGroup>
  1. Delete packages.config from your project and uninstall all packages

  2. Install all packages one more time

    Here is a short snippet how to translate packages.config to single line Install-Packages command

  3. If you encounter such error: error : The project.json is referencing the project 'YourProject.csproj', but an output path was not specified on an item in the ProjectReferencesCreatingPackages property. you have to update Visual Studio to > 15.2

  4. If you project linking a file from packages folder like this:

<Content Include="..\packages\package.1.0.0.1\some.file">
  <Link>some.file</Link>
  <CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>

It should be replaced to something like this:

<Content Include="$(NuGetPackageFolders)\package\1.0.0.1\some.file">
  <Link>some.file</Link>
  <CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>

About

Wrapper to log4net to provide demystified exceptions in messages

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages