E408 Change warning log to debug log when passing `extensionsPath: null` to AddExtCore · Issue #175 · ExtCore/ExtCore · GitHub
[go: up one dir, main page]

Skip to content

Change warning log to debug log when passing extensionsPath: null to AddExtCore #175

@mattjcowan

Description

@mattjcowan

The following is a suggestion (low priority), up for discussion.

I've use the AddExtCore(...) method as follows on a number of projects:

const string DefaultIncludeAssemblyScanningRegex = "^(app.ext.*)$";
services.AddExtCore(null, new DefaultAssemblyProvider(services.BuildServiceProvider())
{
    IsCandidateCompilationLibrary = lib => Regex.IsMatch(lib.Name, DefaultIncludeAssemblyScanningRegex, RegexOptions.IgnoreCase)
});

What do you think about changing the LogWarning to LogDebug on the following line of code?

this.logger.LogWarning("Discovering and loading assemblies from path skipped: path not provided", path);

The reason for this is that for the path to be empty or null, it seems like an explicit decision by design, by the developer. In my opinion that doesn't really necessitate a warning and it bothers me to keep seeing this warning in the logs, and having to explain the warning to those that are monitoring logs.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0