Comments (1)
I disagree that this is something that this library should handle, considering that there are libraries specialized for expression-based filtering. One such library is Serilog Expressions.
Assuming that you are loading the Serilog configuration from a JSON file, you could use something akin to this (switching from Console
logging to Slack
):
{
"Serilog": {
"Using": [ "Serilog.Expressions", "Serilog.Sinks.Console" ],
"WriteTo": [
{
"Name": "Logger",
"Args": {
"configureLogger": {
"Filter": [
{
"Name": "ByIncludingOnly",
"Args": {
"expression": "(@l = 'Information')"
}
}
],
"WriteTo": [
{
"Name": "Console"
}
]
}
}
},
{
"Name": "Logger",
"Args": {
"configureLogger": {
"Filter": [
{
"Name": "ByIncludingOnly",
"Args": {
"expression": "(@l = 'Warning')"
}
}
],
"WriteTo": [
{
"Name": "Console"
}
]
}
}
}
]
}
}
from serilog-sinks-slack.
Related Issues (20)
- Stacktrace field with too long message causes incorrect display HOT 2
- Sign the Assembly with a Strong Name
- usage with Serilog.Settings.Configuration HOT 3
- Add support for outputTemplate message formatting HOT 2
- Slack webhook only working in dotnet core HOT 1
- Sink not writing to Slack HOT 7
- Support custom timestamp attachment format
- Missing license file HOT 1
- Can we show Event properties fullscreen? HOT 3
- MinimumLogEventLevel is ignored HOT 4
- Add Serilog Sink icon to Serilog.Sinks.Slack NuGet package HOT 1
- Application exit before slack log is "slacked" HOT 1
- Expose QueueLimit configuration option
- Publish to NuGet fails HOT 5
- Sink not working in .NET Framework 4.5.2 HOT 1
- Enhancement: Allow option to add custom attachments
- Upgrading to the latest version of Serilog causes infinite loop HOT 5
- Feature Request: Filtering Logs based on Properties HOT 1
- Stack Overflow when using a newer version of Serilog.Sinks.PeriodicBatching
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-slack.