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
- Host: GitHub
- URL: https://github.com/mnie/log4net.demystifier
- Owner: MNie
- License: apache-2.0
- Created: 2017-11-13T21:01:06.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-02-08T17:15:15.000Z (over 8 years ago)
- Last Synced: 2025-04-12T10:47:57.288Z (about 1 year ago)
- Topics: csharp, demystify, demystifying, log4net
- Language: C#
- Size: 27.3 KB
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Log4Net.Demystifier [](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
```