I am using Elmah in my MVC5 project and for error logging I am using XML and not Sql , but the problem i every time Elmah create new file for single Exception , so there are 2 many file if there are 2 many exceptions , I need to know how can we maintain a single log file for all the exceptions occured in our application......... Thanks....."
Loading


Vincent Maverick DuranoRank #238 · 10.3K reputationPosted May 14, 2015, 4:13 AM EDT
As the documentation states: A smart way of keeping logs based on XmlFileErrorLog running smoothly is to limit the number of files by scheduling a task to periodically archive the old logs and clean up the folder.
Having that said, You will need to create a custom batch job that archives or clean up the logs.
Vincent Maverick DuranoRank #238 · 10.3K reputationPosted May 14, 2015, 5:10 AM EDT
Ruchir SaxenaRank #796 · 2.9K reputationPosted May 14, 2015, 4:49 AM EDT
Ruchir SaxenaRank #796 · 2.9K reputationPosted May 14, 2015, 8:54 PM EDT