Check to see if an log event occurs in NLog
问题 I am trying to check to see if a log event happens in my app, and if it does something. I have checked everywhere and can't seem to find any info on if an log event even happens. private static Logger logger = LogManager.GetCurrentClassLogger(); logger.Info("Info Log Message"); if(logger.event == true) { //an log even happen this run } 回答1: It looks like you can use the MethodCall target to accomplish this. You can add a target entry to your NLog.config file that would direct log events to a