mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-11 15:47:09 -07:00
PathProvider. visit us for all of your pathing needs.
This commit is contained in:
parent
c503b497ed
commit
633f0b6197
24 changed files with 315 additions and 188 deletions
26
NzbDrone.Test.Common/LoggingTest.cs
Normal file
26
NzbDrone.Test.Common/LoggingTest.cs
Normal file
|
@ -0,0 +1,26 @@
|
|||
using NLog;
|
||||
using NLog.Config;
|
||||
using NUnit.Framework;
|
||||
using NzbDrone.Common;
|
||||
|
||||
namespace NzbDrone.Test.Common
|
||||
{
|
||||
public abstract class LoggingTest
|
||||
{
|
||||
protected static void InitLogging()
|
||||
{
|
||||
LogConfiguration.RegisterConsoleLogger(LogLevel.Trace);
|
||||
LogConfiguration.RegisterUdpLogger();
|
||||
|
||||
RegisterExceptionVerification();
|
||||
}
|
||||
|
||||
private static void RegisterExceptionVerification()
|
||||
{
|
||||
var exceptionVerification = new ExceptionVerification();
|
||||
LogManager.Configuration.AddTarget("ExceptionVerification", exceptionVerification);
|
||||
LogManager.Configuration.LoggingRules.Add(new LoggingRule("*", LogLevel.Trace, exceptionVerification));
|
||||
LogConfiguration.Reload();
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue