Provide line for warnings and errors
Title
If a warning or error occurs, provide the line in the source file of the issue.
Functional impact
Providing the line of warnings and errors would increase possibilities for further processing of the log file generated by DocFx. With the filename / line information a build script could for example write warnings back to pull requests on the correct place.
Minimal repro steps
run docfx build -l output.log
Expected result
It would be nice to also recieve the line inside the file where the error ocurred like this:
{"message":"Invalid cross reference \"[Foo](xref:foo)\".","source":"Build Document.LinkPhaseHandler.Apply Templates","file":"index.md","line":"42","date_time":"2017-05-12T11:31:13.5247361Z","message_severity":"warning"}
Actual result
A warning currently looks like this in the written log file:
{"message":"Invalid cross reference \"[Foo](xref:foo)\".","source":"Build Document.LinkPhaseHandler.Apply Templates","file":"index.md","date_time":"2017-05-12T11:31:13.5247361Z","message_severity":"warning"}
Docfx can log warning with line via LogWarning Method, and for this cross reference case, we can add logic to indicate line numbers in CrossReferenceNotResolvedException
@pascalberger we've added the line number info via #1722 , closed for now.