An open API service indexing awesome lists of open source software.

https://github.com/mnie/log4net.demystifier

Wrapper to log4net to provide demystified exceptions in messages
https://github.com/mnie/log4net.demystifier

csharp demystify demystifying log4net

Last synced: 10 months ago
JSON representation

Wrapper to log4net to provide demystified exceptions in messages

Awesome Lists containing this project

README

          

# Log4Net.Demystifier [![NuGet Pre Release](https://buildstats.info/nuget/Log4Net.Demystifier?includePreReleases=true)](https://www.nuget.org/packages/Log4Net.Demystifier)
Unmangle the names of async and iterator methods in exception stack traces using @benaadams's [Demystifier](https://github.com/benaadams/Ben.Demystifier) via custom LogManager which wraps your ILog.

# How to Install/Configure?

Install from nuget:

```powershell
Install-Package Log4Net.Demystifier
```

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

```csharp
For().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](https://github.com/dotnet/standard/issues/410).
You have to:
1. add `RestoreProjectStyle` element to csproj

```xml

PackageReference

```
2. Delete packages.config from your project and uninstall all packages
3. Install all packages one more time

[Here is a short snippet how to translate packages.config to single line `Install-Packages` command](https://gist.github.com/MNie/35f43e66e68d300510ca3a6c308d06fd)


4. 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
5. If you project linking a file from packages folder like this:
```xml

some.file
Always

```
It should be replaced to something like this:
```xml

some.file
Always

```