-
-
Notifications
You must be signed in to change notification settings - Fork 142
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
NLog ExceptionlessTarget: ProcessQueueAsync for ExceptionlessClient o…
…n Flush (#301) * ExceptionlessTarget - ProcessQueueAsync for ExceptionlessClient on Flush * ExceptionlessTarget - Added NLogInternalLoggger for easier troubleshooting
- Loading branch information
Showing
2 changed files
with
50 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
using System; | ||
using Exceptionless.Logging; | ||
using NLog.Common; | ||
|
||
namespace Exceptionless.NLog { | ||
internal class NLogInternalLoggger : IExceptionlessLog { | ||
public LogLevel MinimumLogLevel { get; set; } | ||
|
||
public void Debug(string message, string source = null) { | ||
InternalLogger.Debug("ExceptionLess: {0} Source={1}", message, source); | ||
} | ||
|
||
public void Error(string message, string source = null, Exception exception = null) { | ||
if (exception is null) | ||
InternalLogger.Error("ExceptionLess: {0} Source={1}", message, source); | ||
else | ||
InternalLogger.Error(exception, "ExceptionLess: {0} Source={1}", message, source); | ||
} | ||
|
||
public void Info(string message, string source = null) { | ||
InternalLogger.Info("ExceptionLess: {0} Source={1}", message, source); | ||
} | ||
|
||
public void Trace(string message, string source = null) { | ||
InternalLogger.Trace("ExceptionLess: {0} Source={1}", message, source); | ||
} | ||
|
||
public void Warn(string message, string source = null) { | ||
InternalLogger.Warn("ExceptionLess: {0} Source={1}", message, source); | ||
} | ||
|
||
public void Flush() { | ||
// NLog InternalLogger has no flush | ||
} | ||
} | ||
} |