Update NLog target filename at runtime

前端 未结 7 1689
被撕碎了的回忆
被撕碎了的回忆 2020-12-05 18:14

In my application, I work on several thousand of document a day. I\'d like, in some cases some logs, one log by document. Then I\'d like for a specific target change the out

7条回答
  •  心在旅途
    2020-12-05 18:46

    The reason why you get the error is that NLog knows nothing about "logDirectory" keyname. You may implement it by yourself (read instructions here) or use predefined ones from here.

    Then you can use instructuions from here to change NLog targets during runtime.

提交回复
热议问题