Serilog.Sinks.WinForms icon indicating copy to clipboard operation
Serilog.Sinks.WinForms copied to clipboard

Purging/trimming old log lines

Open mvarie opened this issue 3 years ago • 2 comments
trafficstars

Is your feature request related to a problem? Please describe. When you have a long-running application, the controls will eventually fill up with information - there is currently no feature that allows to keep a maximum of n lines, rows, etc..

Describe the solution you'd like It would be nice to have an auto-purge feature that keeps the memory footprint under control (i.e., a maximum number of rows in a grid, or lines/bytes in a textbox).

Describe alternatives you've considered The alternative is manipulating the inner object directly, which at least in the case of your grid, requires accessing a private field.

mvarie avatar Nov 15 '22 10:11 mvarie

Hello, that'd be a great idea, this is representing 2 days of logging in my app:

7c066bd09238471c9ada2cb2047cb6ff

More than 6 millions objects representing about 360MB of Heap Generation

Kiritsu avatar Dec 12 '22 08:12 Kiritsu

I think it will be nice to have this functionality i ll make code changes soon :)

umairsyed613 avatar Dec 17 '22 23:12 umairsyed613