Skip to content

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

Open

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.

Activity

  1. DmitrySikorsky commented on Nov 22, 2020

    @DmitrySikorsky
    Member

    Hi @mattjcowan, you are right, I will do that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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