update logging and add pl splash as the main one
All checks were successful
Build / Build Launcher (push) Successful in 2m31s
All checks were successful
Build / Build Launcher (push) Successful in 2m31s
This commit is contained in:
@@ -46,7 +46,7 @@ public class PluginInstance
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
LogFile.WriteLine($"Unable to find OpenConfigDialog() in {data} due to an error: {e}");
|
||||
LogFile.Log.Error(e, $"Unable to find OpenConfigDialog() in {data} due to an error");
|
||||
openConfigDialog = null;
|
||||
}
|
||||
|
||||
@@ -102,7 +102,7 @@ public class PluginInstance
|
||||
}
|
||||
|
||||
if (count > 0)
|
||||
LogFile.WriteLine($"Registered {count} session components from: {mainAssembly.FullName}", !data.IsLocal);
|
||||
LogFile.Log.Debug($"Registered {count} session components from: {mainAssembly.FullName}", !data.IsLocal);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
@@ -140,13 +140,13 @@ public class PluginInstance
|
||||
catch (Exception e)
|
||||
{
|
||||
data.Status = PluginStatus.Error;
|
||||
LogFile.WriteLine($"Failed to dispose {data} because of an error: {e}");
|
||||
LogFile.Log.Error(e, $"Failed to dispose {data} because of an error");
|
||||
}
|
||||
}
|
||||
|
||||
private void ThrowError(string error)
|
||||
{
|
||||
LogFile.WriteLine(error);
|
||||
LogFile.Log.Debug(error);
|
||||
data.Error();
|
||||
Dispose();
|
||||
}
|
||||
@@ -157,10 +157,10 @@ public class PluginInstance
|
||||
if (data.Status == PluginStatus.Error || !data.TryLoadAssembly(out var a))
|
||||
return false;
|
||||
|
||||
var pluginType = a.GetTypes().FirstOrDefault(t => typeof(IPlugin).IsAssignableFrom(t));
|
||||
var pluginType = a.GetTypes().FirstOrDefault(t => t.IsAssignableTo(typeof(IPlugin)));
|
||||
if (pluginType == null)
|
||||
{
|
||||
LogFile.WriteLine($"Failed to load {data} because it does not contain an IPlugin");
|
||||
LogFile.Log.Warn($"Failed to load {data} because it does not contain an IPlugin");
|
||||
data.Error();
|
||||
return false;
|
||||
}
|
||||
|
Reference in New Issue
Block a user