Renamed SubsonicTarget to DataBaseTarget

pull/4/head
kay.one 14 years ago
parent 5acfce2cc7
commit 7d706a3304

@ -25,7 +25,7 @@ namespace NzbDrone.Core.Test
var db = MockLib.GetEmptyDatabase(true);
var sonicTarget = new SubsonicTarget(db);
var sonicTarget = new DatabaseTarget(db);
LogManager.Configuration.AddTarget("DbLogger", sonicTarget);
LogManager.Configuration.LoggingRules.Add(new LoggingRule("*", LogLevel.Info, sonicTarget));
@ -54,7 +54,7 @@ namespace NzbDrone.Core.Test
//setup
var db = MockLib.GetEmptyDatabase(true);
var sonicTarget = new SubsonicTarget(db);
var sonicTarget = new DatabaseTarget(db);
LogManager.Configuration.AddTarget("DbLogger", sonicTarget);
LogManager.Configuration.LoggingRules.Add(new LoggingRule("*", LogLevel.Info, sonicTarget));
@ -87,7 +87,7 @@ namespace NzbDrone.Core.Test
var db = MockLib.GetEmptyDatabase(true);
var sonicTarget = new SubsonicTarget(db);
var sonicTarget = new DatabaseTarget(db);
LogManager.Configuration.AddTarget("DbLogger", sonicTarget);
LogManager.Configuration.LoggingRules.Add(new LoggingRule("*", LogLevel.Info, sonicTarget));
@ -121,7 +121,7 @@ namespace NzbDrone.Core.Test
var db = MockLib.GetEmptyDatabase(true);
var sonicTarget = new SubsonicTarget(db);
var sonicTarget = new DatabaseTarget(db);
LogManager.Configuration.AddTarget("DbLogger", sonicTarget);
LogManager.Configuration.LoggingRules.Add(new LoggingRule("*", LogLevel.Info, sonicTarget));

@ -70,7 +70,7 @@ namespace NzbDrone.Core
_kernel.Bind<IDatabase>().ToMethod(c => Connection.GetPetaPocoDb(Connection.MainConnectionString)).InRequestScope();
_kernel.Bind<IDatabase>().ToMethod(c => Connection.GetPetaPocoDb(Connection.MainConnectionString, false)).WhenInjectedInto<IJob>();
_kernel.Bind<IDatabase>().ToMethod(c => Connection.GetPetaPocoDb(Connection.MainConnectionString, false)).WhenInjectedInto<JobProvider>();
_kernel.Bind<IDatabase>().ToMethod(c => Connection.GetPetaPocoDb(Connection.LogConnectionString, false)).WhenInjectedInto<SubsonicTarget>().InSingletonScope();
_kernel.Bind<IDatabase>().ToMethod(c => Connection.GetPetaPocoDb(Connection.LogConnectionString, false)).WhenInjectedInto<DatabaseTarget>().InSingletonScope();
_kernel.Bind<IDatabase>().ToMethod(c => Connection.GetPetaPocoDb(Connection.LogConnectionString)).WhenInjectedInto<LogProvider>().InRequestScope();
}
}

@ -7,11 +7,11 @@ using PetaPoco;
namespace NzbDrone.Core.Instrumentation
{
public class SubsonicTarget : Target
public class DatabaseTarget : Target
{
private readonly IDatabase _database;
public SubsonicTarget(IDatabase database)
public DatabaseTarget(IDatabase database)
{
_database = database;
}

@ -29,7 +29,7 @@ namespace NzbDrone.Core.Instrumentation
LogManager.Configuration.AddTarget("Exceptioneer", exTarget);
LogManager.Configuration.LoggingRules.Add(new LoggingRule("*", NLog.LogLevel.Error, exTarget));
#endif
var sonicTarget = CentralDispatch.NinjectKernel.Get<SubsonicTarget>();
var sonicTarget = CentralDispatch.NinjectKernel.Get<DatabaseTarget>();
LogManager.Configuration.AddTarget("DbLogger", sonicTarget);
LogManager.Configuration.LoggingRules.Add(new LoggingRule("*", LogLevel.Debug, sonicTarget));

@ -182,7 +182,7 @@
<Compile Include="Helpers\EpisodeSortingHelper.cs" />
<Compile Include="Helpers\FileSizeFormatHelpercs.cs" />
<Compile Include="Instrumentation\LogProvider.cs" />
<Compile Include="Instrumentation\SubsonicTarget.cs" />
<Compile Include="Instrumentation\DatabaseTarget.cs" />
<Compile Include="Instrumentation\ExceptioneerTarget.cs" />
<Compile Include="Instrumentation\NlogWriter.cs" />
<Compile Include="Datastore\PetaPoco\PetaPoco.cs" />

@ -24,6 +24,6 @@
<logger name="Application" minlevel="Trace" writeTo="consoleTarget"/>
<logger name="*" minlevel="Debug" writeTo="udpTarget"/>
<logger name="*" minlevel="Off" writeTo="xmlFile"/>
<logger name="*" minlevel="Off" writeTo="file"/>
<logger name="*" minlevel="Warn" writeTo="file"/>
</rules>
</nlog>
Loading…
Cancel
Save