logging - NLog:如何刷新 AsyncTargetWrapper?

标签 logging nlog

AsyncTargetWrapper 的 NLog 文档显示了在示例完成写入日志后对wrapper.Flush() 的调用(不带参数)。但 AsyncTargetWrapper 的 Flush() 方法需要 AsyncContinuation 类型的参数。该类的文档没有说明它的用途或如何使用它。我也找不到这样的例子。有人可以告诉我如何使用 Flush() 吗?

非常感谢。

最佳答案

我在 documentation 中找到了这个和 source code :

AsyncContinuation Delegate

Asynchronous continuation delegate - function invoked at the end of asynchronous processing.

示例似乎很少,但您可以找到有关如何使用它的更多信息 here .

关于logging - NLog:如何刷新 AsyncTargetWrapper?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33223657/

相关文章:

java - 通过Java触发的Spark程序中自定义log4j进行日志记录

.net - NLog:记录在 IIS 中的 WCF 应用程序中调用该应用程序的用户

c# - 使用 CaSTLe 日志记录工具将 CaSTLe Windsor 版本 4.0.0 与 NLog 结合起来

java - 比较 log4j 和 Logger

java服务器发送打印流到端口80或443

python - 如何在日志配置文件中引用标准库?

python监控一个日志文件非阻塞

c# - 当应用程序是默认处理程序时,NLog 将日志文件写入不正确的目录

c# - NLog - 删除早于 X 天的日志

asp.net-mvc - Azure 网站中的 ASP.NET MVC4 + Ninject + NLog = 问题