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

NLog.Filters.WhenNotContainsFilter

Matches when the calculated layout does NOT contain 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.