Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...How to limit # of events stored in logHow to limit # of events stored in log
Previous
 
Next
New Post
2/27/2009 4:24 PM
 

I have a requirment that i set the history to log only the most recent 500 events. Does anyone know how i could accomplish this? I don' t see a setting for this in the Log Settings...

 
New Post
2/27/2009 5:38 PM
 

If you're reffering to entires in the SiteLog table:
You can set the type of events logged and the number of days the log is kept but not the number of log entries.  If you need to cap it at 500 you'll need to either add a trigger to the table to purge excess data (will always keep it from going over 500 but adds to core DB config/schema) or add a scheduled script or SP to periodically purge data (will not prevent log from going over 500 but has less "footprint" on core DB config/schema).
 
Hope that helps-
-mamlin


esmamlin atxgeek.me
 
New Post
3/2/2009 1:06 PM
 

Hi, the logs i am referring to are the ones stored in the "Event Viewer."  Can i set the number of days that the logged events shown in Admin->Event Viewer display are kept ?

 
New Post
3/2/2009 1:50 PM
 

mParker wrote
 

Hi, the logs i am referring to are the ones stored in the "Event Viewer."  Can i set the number of days that the logged events shown in Admin->Event Viewer display are kept ?

There are no built-in features in DNN for truncating the Event log as far as I know.  You can schedule jobs on your SQL server to do the trick but not everyone has that kind of access (or knowledge) to do so.  Fortunately you can easily (and freely) use a "SQL scheduler" module to execute your own command on a regular basis (once every day?) to truncate the log down to the past xx days.

Here's a free scheduler module (must have HOST account access for your DNN installation):
 
   http://www.iowacomputergurus.com/free-products/dotnetnuke-modules/scheduled-sql-jobs.aspx
 
 
And here's a simple SQL command to truncate your EVENTLOG table down to events from the past 50 days (warning -- try this on a test copy of DNN first, not on your production copy!):
 
   Delete FROM  EventLog
   WHERE (LogCreateDate < { fn NOW() } - 50)

 
Cheers!
-mamlin


esmamlin atxgeek.me
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...How to limit # of events stored in logHow to limit # of events stored in log


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out