Elmah log files deletion, manually or is there a setting?

前端 未结 4 1689
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-02-12 13:35

How do I delete the log files that Elmah generates on the server?

Is there a setting within Elmah that I can use to delete log files? I would prefer to specify some cr

4条回答
  •  误落风尘
    2021-02-12 14:31

    You can set the maximum number of log entries, but there isn't a native function for clearing out logs older than a given date. It's a good feature request, though!

    If you are storing your error logs in memory the maximum number stored is 500 by default and this requires no additional configuration. Alternatively, you can define the number using the size keyword:

      
        
    
    

    Setting a fixed size is obviously more important for in-memory or XML-based logging, where resources need to be closely managed. You can define a fixed size for any log type though.

提交回复
热议问题