You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
792 B
27 lines
792 B
13 years ago
|
using NLog;
|
||
|
using NLog.Config;
|
||
|
using NUnit.Framework;
|
||
|
using NzbDrone.Common;
|
||
|
|
||
|
namespace NzbDrone.Test.Common
|
||
|
{
|
||
13 years ago
|
public abstract class LoggingTest
|
||
13 years ago
|
{
|
||
13 years ago
|
protected static void InitLogging()
|
||
13 years ago
|
{
|
||
|
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();
|
||
|
}
|
||
|
}
|
||
|
}
|