More in this section

Forums / Developing with Sitefinity / Managing Log file size

Managing Log file size

2 posts, 0 answered
  1. Snehal Mehta
    Snehal Mehta avatar
    8 posts
    31 May 2010
    01 Jun 2010
    Link to this post

    Currently all the events and errors are logged in ~/App_Data/sitefinity.log.

    I want to create a new log file with different name once a certain log file size limit is reached.

    Can someone let me know how can I do it using healthMonitoring in web.config.


  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    12 Sep 2017
    01 Jun 2010
    Link to this post
    Hi Snehal Mehta,

    You need to create a custom WebEventProvider. When an error occurs and the provider is called you should check the current log file size. If the limit is reached, create a new file and log the error entry.To get the file size you can use FileInfo.Length. To create a new file use File Class ( for instance File.CreateText).

    All the best,
    Ivan Dimitrov
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
2 posts, 0 answered