Added logging to module framework

Implemented logging to Adafruit and changed database loading behavior.
This commit is contained in:
2021-08-07 17:20:46 -05:00
parent c94ea4a624
commit 38ffb3c7e1
36 changed files with 304 additions and 240 deletions

View File

@@ -2,6 +2,7 @@ using System;
using System.Reflection;
using System.Runtime.Loader;
using Microsoft.Extensions.DependencyModel;
using Microsoft.Extensions.Logging;
using Props.Shop.Framework;
namespace Props.Services.Modules
@@ -18,6 +19,7 @@ namespace Props.Services.Modules
protected override Assembly Load(AssemblyName assemblyName)
{
if (assemblyName.FullName.Equals(typeof(IShop).Assembly.FullName)) return null;
if (assemblyName.FullName.Equals(typeof(ILoggerFactory).Assembly.FullName)) return null;
string assemblyPath = resolver.ResolveAssemblyToPath(assemblyName);
return assemblyPath != null ? LoadFromAssemblyPath(assemblyPath) : null;
}