Comments (3)
getting the same issue, anyone got a fix?
from serilog-sinks-map.
The Map Sink does not implement limiting/trimming - it just fans out over an unlimited number of sink configurations
The File Sink does implement trimming, but does not let you customize the naming strategy
It's way beyond the remit of Map to manage sinks over time (and Sinks would need to impleent some generic way to route requests to trim if it decided there were too many etc)
The bottom line here is that
- The Map Sink does not (and can not) implement a
retainedFileCountLimit
- the File Sink implements a
retainedFileCountLimit
Thus the most likely way to achieve your goal is to:
- use the File sink (but that does imply accepting the limitations of its naming strategies)
- possibly use the File's Sink's Lifecycle hooks to customise things
from serilog-sinks-map.
Duplicate of #15 (feature request to implement generic trimming)
from serilog-sinks-map.
Related Issues (20)
- Limit the number of sinks held open in the map
- Not working sub-loggers for properties with specific char - dot HOT 7
- Can I configure by appsettiongs? HOT 3
- Does this support SQL Server? HOT 1
- docs: Add cleanup policy overview HOT 2
- feat: Customizable disposal policy wrt concurrent sinks limit HOT 2
- MappedSink.Dispose doesn't dispose underlying sinks HOT 4
- Getting started example not working HOT 1
- Serilog.Settings.Configuration compatibility? HOT 2
- LogFile name for each assembly HOT 1
- Missing documentation on json configuration HOT 1
- feat: Configure Sink via Serilog.Settings.Configuration HOT 1
- Target .NET 4.5? HOT 2
- Memory leak when 'sinkMapCountLimit' is set in WriteTo.Map HOT 1
- System.OutOfMemoryException with Serilog.Sinks.Map HOT 1
- Combined with dynamic creating SQL tables inside a transaction delivers EF distributed transaction error HOT 1
- I want to map a reference type,but it not working as set value HOT 1
- Hot-reload any Serilog sink sample not working HOT 4
- Question: Is there a reason why this package is still Preview? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from serilog-sinks-map.