3

I am trying to create a different internal log file for each day using the ${date} layout renderer in the internalLogFile name. I understand that this is possible only for a target layout. So, are there any alternate solution to this so I can automatically create a new internal log file each day, with that day's date in the file name? The file tends to get very large even for a single day, so to have one file forever would be ridiculous.

I am using asp.net-mvc-4 C# razor, if that makes any difference.

1
  • Also note that the internallog should not be that large in normal circumstances.
    – Julian
    Oct 12, 2016 at 14:54

1 Answer 1

1

You can set it from C#:

InternalLogger.LogFile = @"c:\temp\internallog.log"; 

http://nlog-project.org/documentation/v4.3.0/html/P_NLog_Common_InternalLogger_LogFile.htm

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.