简体   繁体   English

CKFinder NLog 不记录

[英]CKFinder NLog Isn't Logging

I am using CKFinder in ASP.NET.我在 ASP.NET 中使用 CKFinder。 It has been working but has recently stopped (uploads specifically).它一直在工作,但最近停止了(特别是上传)。 While trying to track down the issues, I noticed no logs are being written.在尝试追查问题时,我注意到没有写入任何日志。

In my web.config, I have enabled verbose logging for ckfinder:在我的 web.config 中,我为 ckfinder 启用了详细日志记录:

enableVerboseLogging="true"

Here is my NLog.config file (which I am not familiar with; we use log4net).这是我的 NLog.config 文件(我不熟悉;我们使用 log4net)。 Other traces are being written via NLog, however, so I think this is correct.但是,其他跟踪是通过 NLog 写入的,所以我认为这是正确的。

<nlog xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <targets async="true">
    <target xsi:type="File" name="logFile" fileName="${basedir}/App_Data/logs/ckfinder.log"
            archiveFileName="${basedir}/App_Data/logs/archives/ckfinder.{#}.log" archiveEvery="Day" archiveNumbering="Rolling" maxArchiveFiles="5" concurrentWrites="true" keepFileOpen="false"
            layout="${level} | ${logger} | ${longdate} | ${message}${onexception: | ${exception:format=ToString,StackTrace:maxInnerExceptionLevel=10}}" />
  </targets>
  <rules>
    <logger name="*" minlevel="Trace" writeTo="logfile" />
  </rules>
</nlog>

I was forgetting this line from Startup.Configuration:我忘记了 Startup.Configuration 中的这一行:

LoggerManager.LoggerAdapterFactory = new NLogLoggerAdapterFactory();

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM