In this article we will learn tourbleshooting with the log4net RollingFileAppender.
This article is about troubleshooting and not a how-to. Earlier, a friend of mine was testing a ftp file upload application. One of his problems was a struggle to verify the FTP uploaded files against the local machine and he landed with the following awesome findings:
Let's cover our resolution approaches for all the above issues in a series of posts-
His application uses log4net for logging with the RollingFileAppender configuration as:
He was in such hurry and tense to not do any further drill down. He affirmed with his findings without listening to the facts. This happens to anyone if you are running behind the schedules and are lacking time. I asked for these 2 exercises because I saw him in such a panic and ditto that he is missing something. Log4net can't play revenge with a specific text file by avoiding its logging :P but, he was so confident to not listen to me for this basic troubleshooting procedure.
Increase the no Roll Backup nos. to a higher one:
ORIncrease the file size:
ORCheck by just transferring only that specific text file to see if it is being logged.
It was as obvious as I guessed, there was nothing ignored. RollingFileAppender was set to keep only 10 log files of 2Mb of each. In this case, only 10 log files entries are maintained and other files are deleted by the logger. And that specific file was the victim of this. In other words, there may be other files whose log information was disappearing from the log files.
Let's troubleshoot the 2 remaining issues in the next article :) Continue...
Pro WPF: Windows Presentation Foundation in .NET 3.0