以编程方式启用内部记录器
如果出现问题,请启用内部记录器。
C#示例:
// set internal log level
InternalLogger.LogLevel = LogLevel.Trace;
// enable one of the targets: file, console, logwriter:
// enable internal logging to a file (absolute or relative path. Don't use layout renderers)
InternalLogger.LogFile = "c:\\log.txt";
// enable internal logging to the console
InternalLogger.LogToConsole = true;
// enable internal logging to the console (error stream)
InternalLogger.LogToConsoleError = true
// enable internal logging to the Trace
InternalLogger.LogToTrace = true
// enable internal logging to a custom TextWriter
InternalLogger.LogWriter = new StringWriter(); //e.g. TextWriter writer = File.CreateText("C:\\perl.txt")