I log some stuff with LogEventInfo
, because I'm adding a variable property called Action
to each log. In my target the layout
is simple, layout="${message}"
, but fileName
is complex, fileName="C:\log\${date:format=yyyy-MM-dd HH-mm-ss} ${event-properties:item=Action}.log"
.
But I still want to restrict the space taken with all these log files. It doesn't matter if it's by size, or date, or number of files. How do I archive log files with such custom file name?
There is an answer from 2013 stating that this is not possible, but I'm hoping that that answer is now incorrect, even if it was correct back then.