1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2025-01-06 06:41:40 +02:00
Sonarr/NzbDrone.Test.Common/LoggingFixtures.cs

29 lines
801 B
C#
Raw Normal View History

2011-10-24 08:54:09 +03:00
using NLog;
using NLog.Config;
using NUnit.Framework;
using NzbDrone.Common;
namespace NzbDrone.Test.Common
{
public abstract class LoggingFixtures
{
[SetUp]
public void SetUpBase()
{
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();
}
}
}