Skip to content

Commit 4aac8c8

Browse files
author
BRUNER Patrick
committed
small things
1 parent c15919c commit 4aac8c8

4 files changed

Lines changed: 8 additions & 15 deletions

File tree

src/PluginRegistry/PluginManifest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ public bool IsCompatibleWith (Version logExpertVersion)
317317
catch (Exception ex) when (ex is ArgumentException or
318318
FormatException)
319319
{
320-
_logger.Error(ex, "ArgumentException checking version compatibility for {Name}: '{Requirement}'. Details: {Message}", Name, Requires.LogExpert, ex.Message);
320+
_logger.Error(ex, "ArgumentException/FormatException checking version compatibility for {Name}: '{Requirement}'. Details: {Message}", Name, Requires.LogExpert, ex.Message);
321321
return false; // Fail closed on error
322322
}
323323
catch (Exception ex)

src/PluginRegistry/PluginRegistry.cs

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -748,18 +748,12 @@ private bool LoadPluginAssembly (string dllName, PluginManifest? manifest)
748748
_logger.Debug("Checking type {TypeName} in assembly {AssemblyName}", type.FullName, assembly.FullName);
749749

750750
// Check for ILogLineColumnizer
751-
if (type.GetInterfaces().Any(i => i.FullName == typeof(ILogLineColumnizer).FullName))
751+
if (type.GetInterfaces().Any(i => i.FullName == typeof(ILogLineColumnizer).FullName) &&
752+
TryInstantiatePluginSafe(type, out var instance) &&
753+
instance is ILogLineColumnizer columnizer)
752754
{
753-
// Instantiate plugin safely with timeout
754-
if (TryInstantiatePluginSafe(type, out var instance))
755-
{
756-
// Process as ILogLineColumnizer
757-
if (instance is ILogLineColumnizer columnizer)
758-
{
759-
ProcessLoadedPlugin(columnizer, manifest, dllName);
760-
pluginLoadedCount++;
761-
}
762-
}
755+
ProcessLoadedPlugin(columnizer, manifest, dllName);
756+
pluginLoadedCount++;
763757
}
764758

765759
// Check for other plugin types (regardless of whether ILogLineColumnizer was found)
@@ -829,7 +823,6 @@ NotSupportedException or
829823
}
830824
}
831825

832-
833826
/// <summary>
834827
/// Processes a loaded plugin (either from cache or fresh load).
835828
/// </summary>

src/docs/PLUGIN_DEVELOPMENT_GUIDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -582,6 +582,6 @@ Contributions welcome! If you create a useful plugin, consider:
582582

583583
---
584584

585-
**Happy Plugin Development!** ??
585+
**Happy Plugin Development!**
586586

587587
*This guide is for LogExpert 1.11.0 and later.*

src/docs/PLUGIN_HASH_MANAGEMENT.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ To enable/disable:
5252
dotnet build src/PluginRegistry/LogExpert.PluginRegistry.csproj /t:GeneratePluginHashes --configuration Release
5353
```
5454

55-
**Important**: The target requires that plugins have already been bitten and are present in the output directory. Make sure to build the entire solution first:
55+
**Important**: The target requires that plugins have already been built and are present in the output directory. Make sure to build the entire solution first:
5656

5757
```powershell
5858
# 1. Build all projects (including plugins) in Release mode

0 commit comments

Comments
 (0)