Optimized logging to improve performance

pull/4/head
kay.one 14 years ago
parent 69406a95d4
commit 9cad9bbbd7

@ -75,7 +75,7 @@ namespace NzbDrone.Core
var logRepository = new SimpleRepository(logDbProvider, SimpleRepositoryOptions.RunMigrations);
//dbProvider.ExecuteQuery(new QueryCommand("VACUUM", dbProvider));
dbProvider.Log = new NlogWriter();
//dbProvider.Log = new NlogWriter();
_kernel.Bind<QualityProvider>().ToSelf().InSingletonScope();
_kernel.Bind<TvDbProvider>().ToSelf().InTransientScope();

@ -108,6 +108,7 @@ namespace NzbDrone.Core.Providers
public virtual Series FindSeries(string title)
{
//TODO:Add series alias support here. if a series is not found in the repo should be tried using its aliases
var normalizeTitle = Parser.NormalizeTitle(title);
return _repository.Single<Series>(s => s.CleanTitle == normalizeTitle);
}

@ -9,10 +9,10 @@
<parameter name="ThreadName" layout="${threadname}" xsi:type="NLogViewerParameterInfo" />
</target>
<target name="file" xsi:type="File"
<target name="file" xsi:type="File" keepFileOpen="true" openFileCacheTimeout="1"
layout="${longdate} [${level}] ${logger}: ${message} ${exception:ToString}"
fileName="${basedir}/App_Data/logs/${shortdate}.txt" />
<target name ="xmlFile" xsi:type="File"
<target name ="xmlFile" xsi:type="File" keepFileOpen="true" openFileCacheTimeout="1"
fileName="${basedir}/App_Data/logs/${shortdate}.xml"
layout="${log4jxmlevent:includeSourceInfo=true:includeCallSite=true:includeMDC=true:appInfo=true:includeNDC=true:includeNLogData=true}"/>
</targets>

Loading…
Cancel
Save