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 ...Controlling log files in Portals\_default\LogsControlling log files in Portals\_default\Logs
Previous
 
Next
New Post
3/23/2015 2:44 PM
 
Hello,
I don't understand what's wrong.
The DotNetNuke.log4net.config says:
maximumFileSize value="10MB"
maxSizeRollBackups value="5"

However, in /Portals/_default/Logs there are more than 1000 files, with a total of 131MB.

How to properly configure DotNetNuke.log4net.config to limit how many file should be kept?

Thanks!
 
New Post
3/23/2015 3:14 PM
 

Unfortunately, Log4Net doesn't support trimming the logs when using date "rolling," i.e. when it is setup to create a new file for each day, the maxSizeRollBackups setting is ignored (see the final Caution section of http://logging.apache.org/log4net/rel...). To keep the logging to 5 10MB files, change rollingStyle to Size instead of Date.

To answer some of the previous questions in this thread, the Log4Net log is more in-depth/diagnostic logging than what the Site Log or Event Log provides. It is capable of logging lots of information in addition to what gets logged by the Event Viewer. So long as you aren't investigating an issue, you should be free to delete all of the log files.


Brian Dukes
Engage Software
St. Louis, MO
866-907-4002
DNN partner specializing in custom, enterprise DNN development.
 
New Post
3/23/2015 3:18 PM
 
Thanks, Brian.
rollingStyle 'date' is a lot more useful. I'll keep it, and look for a PowerShell script to purge files older XX days. Someone should have already done that... if not I'll create it.
 
New Post
3/23/2015 3:31 PM
 
with some edits, this could be a starting point: http://blog.danskingdom.com/powershel...
 
New Post
3/25/2015 10:33 AM
 
$Path = "C:\www\" # or a list of paths like "D:\www\mysite1\","D:\www\mysite2\"
$Daysback = "-120"
$CurrentDate = Get-Date
$DatetoDelete = $CurrentDate.AddDays($Daysback)

Get-ChildItem -Path $Path -Filter *.log.resources -Recurse | Where-Object { $_.LastWriteTime -lt $DatetoDelete -and $_.Directory -like "*\_default\Logs"} | Remove-Item
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Controlling log files in Portals\_default\LogsControlling log files in Portals\_default\Logs


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