Configure archival and purging of log file in Nlog
In previous article " Implement Logging in Sql Server Database using Nlog in .net core MVC application - part 3 " I have demonstrated that how we can implement Logging in sql server database using Nlog in .core mvc application. In previous article I have logged the exceptions in sql server database , in this article I will show you how you can configure archival and purging of log file by modifying the few settings in Nlog.config file. Archival and purging of logs will help us to remove the outdated log files from the server and keep server storage junk free. Lets configure the Nlog.config file to achieve the archival and purging of log file. <?xml version="1.0" encoding="utf-8" ?> <nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.nlog-project.org/schemas/NLog.xsd NLog.xsd" autoReload="true...