Programatically change a logging target’s path and file name for NLog. Figured I’d put this out there in case it speeds up someone’s learning process. This is in C#.
FileTarget target = LogManager.Configuration.FindTargetByName(“file”) as FileTarget;
String logfile = “somepath” + “/some_name.txt”;
target.FileName = logfile;
From: http://ift.tt/1hFLQix
No comments:
Post a Comment