ChangemakerStudios / serilog-sinks-mongodb

A sink for Serilog that writes events to MongoDB
Apache License 2.0
90 stars 51 forks source link

Added new field timestamp for local time .which makes it compatible w… #84

Closed SajidKhanz closed 7 months ago

SajidKhanz commented 1 year ago

There is Serilog-UI project for mongo db sink which is relying on field Timestamp for sorting but current in the Logentry class name is UtcTimeStamp. I have added one extra field to make it compatible with that and make it as local time instead of UTC.

Jaben commented 7 months ago

There is Serilog-UI project for mongo db sink which is relying on field Timestamp for sorting but current in the Logentry class name is UtcTimeStamp. I have added one extra field to make it compatible with that and make it as local time instead of UTC.

Where is this project? Can you provide a link? Seems like that project could modify to support the UtcTimeStamp instead of duplicating the fields for all the folks who use this sink.

Jaben commented 7 months ago

It looks like the Serilog UI project supports the UtcTimeStamp now:

image

Closing this PR

Jaben commented 7 months ago

Link: https://github.com/serilog-contrib/serilog-ui/blob/master/src/Serilog.Ui.MongoDbProvider/MongoDbLogModel.cs

SajidKhanz commented 7 months ago

that is great . Thank you so much

SajidKhanz commented 7 months ago

Link: https://github.com/serilog-contrib/serilog-ui/blob/master/src/Serilog.Ui.MongoDbProvider/MongoDbLogModel.cs

The only issue is when sorting by the time in the Serilog UI , they are relying on timestamp field instead of utctimestamp

Jaben commented 6 months ago

Link: https://github.com/serilog-contrib/serilog-ui/blob/master/src/Serilog.Ui.MongoDbProvider/MongoDbLogModel.cs

The only issue is when sorting by the time in the Serilog UI , they are relying on timestamp field instead of utctimestamp

Maybe open an issue/PR over there?