<PackageReference Include="NLog" Version="6.1.3" />

NLog.Filters.WhenContainsFilter

Matches when the calculated layout contains the specified substring. This filter is deprecated in favor of <when /> which is based on conditions.
public bool IgnoreCase { get; set; }

Gets or sets a value indicating whether to ignore case when comparing strings.

public string Substring { get; set; }

Gets or sets the substring to be matched.