There was an error while loading. Please reload this page.
Logging messages (hooks invocation, watcher checks, errors etc.) is a feature available thanks to the IWardenLogger interface:
public interface IWardenLogger { void Trace(string message); void Info(string message); void Error(string message, Exception exception = null); }
The log level simply defines which messages should be written to the output:
public enum WardenLoggerLevel { Error = 1, Info = 2, Trace = 3, All = 4 }
Logger can be configured using the SetLogger() method available while configuring either the Warden or Warden Manager.
SetLogger(() => new MyLogger());
It is also possible to use the built-in Console Logger:
WithConsoleLogger(minLevel: WardenLoggerLevel.Info, useColors: true);