From ab1065a567151fd45fcf4698cd7d18708b94e35f Mon Sep 17 00:00:00 2001 From: LukePulverenti Date: Thu, 21 Feb 2013 15:26:35 -0500 Subject: removed static logger --- MediaBrowser.Common/Plugins/BasePlugin.cs | 12 +++++++++--- MediaBrowser.Common/Plugins/IPlugin.cs | 3 ++- 2 files changed, 11 insertions(+), 4 deletions(-) (limited to 'MediaBrowser.Common/Plugins') diff --git a/MediaBrowser.Common/Plugins/BasePlugin.cs b/MediaBrowser.Common/Plugins/BasePlugin.cs index 3cce146fae..4da5a69f39 100644 --- a/MediaBrowser.Common/Plugins/BasePlugin.cs +++ b/MediaBrowser.Common/Plugins/BasePlugin.cs @@ -189,7 +189,7 @@ namespace MediaBrowser.Common.Plugins get { // Lazy load - LazyInitializer.EnsureInitialized(ref _configuration, ref _configurationInitialized, ref _configurationSyncLock, () => XmlSerializer.GetXmlConfiguration(ConfigurationType, ConfigurationFilePath) as TConfigurationType); + LazyInitializer.EnsureInitialized(ref _configuration, ref _configurationInitialized, ref _configurationSyncLock, () => XmlSerializer.GetXmlConfiguration(ConfigurationType, ConfigurationFilePath, Logger) as TConfigurationType); return _configuration; } protected set @@ -274,15 +274,21 @@ namespace MediaBrowser.Common.Plugins /// Starts the plugin. /// /// The kernel. + /// The logger. /// kernel - public void Initialize(IKernel kernel) + public void Initialize(IKernel kernel, ILogger logger) { if (kernel == null) { throw new ArgumentNullException("kernel"); } - Logger = LogManager.GetLogger(Name); + if (logger == null) + { + throw new ArgumentNullException("logger"); + } + + Logger = logger; Kernel = kernel; diff --git a/MediaBrowser.Common/Plugins/IPlugin.cs b/MediaBrowser.Common/Plugins/IPlugin.cs index 2427e6a136..fdd99868ab 100644 --- a/MediaBrowser.Common/Plugins/IPlugin.cs +++ b/MediaBrowser.Common/Plugins/IPlugin.cs @@ -107,8 +107,9 @@ namespace MediaBrowser.Common.Plugins /// Starts the plugin. /// /// The kernel. + /// The logger. /// kernel - void Initialize(IKernel kernel); + void Initialize(IKernel kernel, ILogger logger); /// /// Disposes the plugins. Undos all actions performed during Init. -- cgit v1.2.3