Nlog日志在参数中传递

时间:2018-03-05 17:21:08

标签: c# nlog

我想知道是否有一种简单的方法来记录传递给方法的所有参数,而不必自己手动写出来?

public void test(string one, DateTime date, string[] list) {
   logger.debug("Params: {0}, {1},{2}", one, date, list); // instead of having to do something like this, is there something like this
    nlog.logMethod(this) 
}

0 个答案:

没有答案