1
0
Fork 0
mirror of https://github.com/Sonarr/Sonarr synced 2024-12-24 08:44:46 +00:00

Renamed SubsonicTarget to DataBaseTarget

This commit is contained in:
kay.one 2011-06-23 21:05:31 -07:00
parent 5acfce2cc7
commit 7d706a3304
6 changed files with 10 additions and 10 deletions

View file

@ -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));

View file

@ -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();
}
}

View file

@ -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;
}

View file

@ -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));

View file

@ -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" />

View file

@ -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>