AArnott / CodeGeneration.Roslyn

Assists in performing Roslyn-based code generation during a build.
Microsoft Public License
408 stars 59 forks source link

What is Logger actually doing #130

Closed mwpowellhtx closed 5 years ago

mwpowellhtx commented 5 years ago

Trying to grok the core Log method. What is it actually doing? Basically splitting/reporting "lines" (loosely speaking) of potentially new-line or carriage-return-new-line delimited text? Why not simply use the String.Split using the RemoveEmptyEntries?

amis92 commented 5 years ago

It might've been overcomplicated. My best guess is for performance reasons to minimize amount of string instances.

AArnott commented 5 years ago

Gah, I have no idea what it's doing. I deny any ownership of that. ;)

mwpowellhtx commented 5 years ago

Trying for it to behave like a Span before there was such a thing?

LokiMidgard commented 5 years ago

I think the initial version of the logger was written by me. I think I just tried to allocate less strings.