Developer forum

Forum » Ecommerce - Standard features » Limit amount of logged data

Limit amount of logged data

Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

Hi there,

We recently had an issue on one of our sites where we accidentally imported 100 or so old orders. In addition, we have a scheduled task that captures orders in a specific state which runs every five minutes. Since these were old orders (and had already been captured) we got an error on the capturing attempt. That's all fine, except that deep down in CheckoutHandler.vb the exception is logged as follows: (in Private Shared Sub LogErrorWithName):

LogToFile.Log(String.Format("Order {0}: {1}", orderID, String.Format(message, args)), ex, String.Format("/eCom/CheckoutHandler/{0}/Errors", name), LogToFile.LogType.OneEntryPerFile, True, LogToFile.LogElements.All)

The last three parameters generate about 1MB of (for us useless) information such as all the server and session variables. Take this times 100+ orders, times 12x an hour times a day or two or or so and we had DOS'ed our own server by clogging the disk ;-)

Can either the amount of data being logged be limited in the Capture method or can we have an optional parameter on it like bool minimalLogging = false which then - when true - doesn't specify the last three params to LogToFile?

On behalf of our server park maintenance team: thank you ;-)

Imar


Replies

 

You must be logged in to post in the forum