diff options
Diffstat (limited to 'src/main.lib/Services/PluginService.cs')
-rw-r--r-- | src/main.lib/Services/PluginService.cs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/main.lib/Services/PluginService.cs b/src/main.lib/Services/PluginService.cs index 404e65d..af06227 100644 --- a/src/main.lib/Services/PluginService.cs +++ b/src/main.lib/Services/PluginService.cs @@ -17,7 +17,7 @@ namespace PKISharp.WACS.Services private readonly List<Type> _argumentProviders; private readonly List<Type> _optionFactories; private readonly List<Type> _plugins; - + internal readonly ILogService _log; public IEnumerable<IArgumentsProvider> ArgumentsProviders() @@ -25,7 +25,9 @@ namespace PKISharp.WACS.Services return _argumentProviders.Select(x => { var c = x.GetConstructor(new Type[] { }); - return (IArgumentsProvider)c.Invoke(new object[] { }); + var ret = (IArgumentsProvider)c.Invoke(new object[] { }); + ret.Log = _log; + return ret; }).ToList(); } @@ -105,9 +107,9 @@ namespace PKISharp.WACS.Services { return x.AsType(); } - catch (Exception) + catch (Exception ex) { - _log.Error("Error loading type {x}", x.FullName); + _log.Error(ex, "Error loading type {x}", x.FullName); throw; } } |