mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-14 10:47:08 -07:00
lots of different things ;)
This commit is contained in:
parent
c42518b34e
commit
4ae268b8e5
71 changed files with 526 additions and 1229 deletions
28
NzbDrone.Test.Common/LoggingFixtures.cs
Normal file
28
NzbDrone.Test.Common/LoggingFixtures.cs
Normal file
|
@ -0,0 +1,28 @@
|
|||
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();
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue