serilog-formatting-compact-reader
serilog-formatting-compact-reader copied to clipboard
Add support for async reads
Closes #24
Thanks for the PR!
I've spent a bit of time with <Nullable>enable</..>
recently, and wonder if (since LogEvent
is a class), the better option here might be just:
public async Task<LogEvent?> TryReadAsync()
With null checking, this ends up "safe" (or a little safer than the earlier options, anyway), so I suspect that this will end up being the norm in future APIs.
What do you think?
Thanks for reviewing, Nick. I generally agree that for this API, returning an NRT would make sense as there's no other meaning for null
in this case, and would be "safe" as you said.
I actually didn't think NRT was an option for libraries that still target .NET Framework, but after your comment I read more about it, it doesn't seem it's a big issue anymore (if it ever were), just not the same experience/same warnings you'd get on .NET Core/.NET5.
I'll give it a go and see what the experience is like consuming APIs that use NRTs from net45
, net48
, netstandard2.0
projects and get back to you.
ps: I'm assuming we're still support net45
and netstandard1.x
for the time being.
Hey @augustoproiete! I'm thinking about picking this one up, let me know if you're still keen to work on it, but guessing with the long time passed and current commitments that this is probably stale now :-) 👋
Hey @nblumhardt looks like I forgot about this one 😄. If you have spare cycles now feel free to takeover, otherwise I'll come back in a few weeks during summer break
@augustoproiete @nblumhardt
Just bumping as I would find this very useful. I am writing a log viewer in Blazor (which I am thinking about making open source)
Thanks for the work on this 👍
Now covered by #43 - thanks @augustoproiete :wave: