Vixen
02b45cc4
csharp
public sealed class LogFilter

Which categories, at which levels, a sink keeps.

No guide page documents this yet — the page shows what the code says about itself.

Remarks

Its own object rather than a set of properties on a sink, because doc 13 asks for per-category levels that are live-editable in the editor and read from vixen.log.yaml — and a host with five sinks would otherwise have five copies of that configuration to keep in step. Hand the same LogFilter to every sink and "turn on verbose asset loading" is one call; give each its own and the file can stay verbose while the console stays quiet, which is the other thing hosts want.

Categories are matched by prefix, longest first, so Vixen.Graphics is a single switch for everything under it and a rule naming one type still beats it whatever order the two were added in.

Fields and properties (2)

  • public LogLevel MinimumLevel

    The level below which nothing is recorded, regardless of category.

  • public int CategoryRuleCount

    How many per-category rules are in force.

Methods (3)

  • public void SetCategoryLevel(string categoryPrefix, LogLevel level)

    Sets the minimum level for a category and everything beneath it. The longest matching prefix wins, so a specific rule beats a general one whatever order they were added in.

  • public void ClearCategoryLevels()

    Forgets every per-category rule.

  • public bool IsEnabled(string category, LogLevel level)

    Whether a record at this level and category would be kept.

Used by (11)

  • AppBuilderVixen.App.Hosting
  • ConsoleSinkVixen.Core.Diagnostics
  • EventSourceSinkVixen.Core.Diagnostics
  • LogRecordSinkVixen.Core.Diagnostics
  • LogSinkVixen.Core.Diagnostics
  • PlatformSinkVixen.Core.Diagnostics
  • RemoteSinkVixen.Core.Diagnostics
  • RingBufferSinkVixen.Core.Diagnostics
  • SinkTestsVixen.Core.Diagnostics.Tests
  • ZLoggerFileSinkVixen.Core.Diagnostics
  • EditorLogVixen.Editor.App