How to serialize LogRecord object to json? #6043
Unanswered
duongphuhiep
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I'm looking for a way to serialize a LogRecord to a json and then write logs to a file.
Do you know if there's already any nuget doing that (so I won't have to develop my own custom Log Exporter).
When looking at the source codes LogRecord.cs: This class contains many logics, methods.. it is more like a "LogRecordProcessor" or "LogRecordKitchenSink", rather than a "LogRecord". I'm not sure what is the (main) responsibility of this class?
Anyway, the
LogRecord
class seems to do many things, while I expected it to be a pure POCO/DTO which you can simply JsonSerialize as is.Beta Was this translation helpful? Give feedback.
All reactions