Comments (8)
MessageTemplate and EventIdHash exposed. Please see #38
from serilog-sinks-azuredocumentdb.
@martinstrimpfl Sink is emitting rendered message instead of MessageTemplate. I believe a good message is better than cryptic template but if there is a better use case, it can be made part of log message in later releases.
from serilog-sinks-azuredocumentdb.
The reasons for the MessageTeplate field introduction are described here: https://nblumhardt.com/2014/09/how-not-to-parameterize-serilog-events/
IMHO it would be left to the user to decide whether to render the Message or to write the MessageTemplate or to use both.
Another option is to include a hash value of the template in the Properties.
from serilog-sinks-azuredocumentdb.
Under the hood, same good practiced is being followed except message rendering part. In practice I got mixed signals from end users asking where is message?
Initially, I was showing message template but people were asking what is this message? MessageTemplate": "The time is {Time},
. Mostly there were expecting a complete message instead of template.
However, I'm still storing message properties as object for application or automated processing. Inclusion of Message Template as hash is an option too.
@nblumhardt your input please.
from serilog-sinks-azuredocumentdb.
IMHO the inclusion of the MT's hash would be a nice solution - it would keep the message readable when allowing the search for all the occurrences at the same time.
from serilog-sinks-azuredocumentdb.
π hash is a good "happy medium". There's a hash implementation in Serilog.Formatting.Compact that may be useful to copy in and use here - EventIdHash.cs.
from serilog-sinks-azuredocumentdb.
Is it possible to implement it? I've done it locally but I am not allowed to push my changes (in a branch) to the repo.
from serilog-sinks-azuredocumentdb.
Indeed its possible but will take some time before it make its way nuget.
from serilog-sinks-azuredocumentdb.
Related Issues (20)
- Dictionary<,> Not Serializing properly HOT 3
- Logging works only for the first time and stops there after HOT 9
- NullReferenceException in LogEventExtensions.ConvertToDictionary HOT 10
- Error log event not saving data in DocumentDB HOT 2
- Sink does not work with Microsoft.Azure.DocumentDB 1.15.0 HOT 7
- Question: Is there retry logic if Azure Doc db is unreachable for any reason HOT 2
- Actor thread blocking at Serilog.Sinks.Batch.BatchProvider.EventPump HOT 1
- Getting βThe module was expected to contain an assembly manifest.β when configuring Serilog logging in my API project HOT 7
- .csdef file gives error when i specify <Setting name="serilog:write-to:AzureDocumentDB.endpointUrl" /> HOT 4
- Upgrading from 3.8.0 to 3.8.1 destroys production server CPU (~400% increase) HOT 10
- Serilog 3.7.0 onwards doesn't support .NETStandard anymore HOT 3
- Allow the Ability to Define a Partition Key For the Container
- Upgrade to newer version of Cosmos SDK
- Cannot write to Cosmos DB HOT 2
- Nothing logged written to database HOT 1
- a suggestion about intro documentation HOT 1
- Sometimes logs are note written to the CosmosDb
- Logs are not getting written into User Created Cosmos DB / Container
- A new organization for this repository
- Serilog to Cosmos DB - Not saving timestamp to ISO 8601 UTC standard
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-azuredocumentdb.