My company is currently running an RPA solution with 23 robotic processes on 15 different machines with configured robots handling a few thousand cases per day. Originally we were running with the basic RuntimeLog logging file but these were growing to several GBs in size. This is too large for even notepad to open without manually resetting the robot each day and forcing the creation of a new log file.
I would like to switch to the Log4Net logging files and roll the log on a daily basis. Currently I'm only able to find how to set the maximum file size for the rolling functionality to kick in. The only formatting for "maximumFileSize value" I can find in the community is MB and it's always set to 10.
I tried using 999MB as my maximumFileSize but it appears the built-in cap is actually 10 since all of my files are rolling after hitting 10MB.
This doesn't really work for us because it's creating a new file every 15-20 minutes. I've already turned off most of the items being logged and leaving only what I need.
The issue is we're processing so many cases that the files get very big.
Does anybody have an example of how they have used days instead of file size to roll the Log4Net files? I am not able to locate any examples for this.
I tried this approach but unfortunately it doesn't work. Property "datePattern value" doesn't exist and replacing "maximumFileSize value" with it breaks the configuration file. Using "rollingStyle value" as "Date" doesn't work either because the file still rolls according to the size limit. Perhaps this is an either/or scenario? Date or size, whichever comes first?
Instead, I identified the problem with setting the maximum file size. There are two places where log4net settings are found. The location near the top of the file, I'm assuming, is meant to be dynamic and read the settings located more near the bottom of the file. However, the 10MB limit is hardcoded in the top location which is overwriting any change I make at the bottom. This is why setting 999MB at the bottom wasn't working.
"maximumfileSize value =" 10MB""
and the file is rolling at 100MB. This is about 3 hours worth of log data so I will experiment more with this number to get the most efficient log size for our purposes.