Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add page context to error logging in rendering #2593

Merged
merged 1 commit into from Oct 19, 2016

Conversation

choeppler
Copy link
Contributor

Add logging of the errors/warnings which rst2html outputs to its stderr
stream when rendering rst documents. Note that rst2html outputs warnings
and errors to stderr but it also adds them to the generated html. ->
hugo logs everything in stderr as error.

Add / complete adding page context (path to file being rendered) to
anything logged by getRstContent and getAsciidocContent.

See #2570

@choeppler
Copy link
Contributor Author

Exemplary output with the changes in 7a5c7dee22e89995ed266d37db674c845cbce0c3:

<snip/>
INFO: 2016/10/17 12:14:52 content.go:608: Rendering post/test2.rst with /usr/bin/rst2html ...
INFO: 2016/10/17 12:14:52 content.go:608: Rendering post/demo.rst with /usr/bin/rst2html ...
ERROR: 2016/10/17 12:14:52 content.go:620: post/test2.rst:7: (WARNING/2) Definition list ends without a blank line; unexpected unindent.
ERROR: 2016/10/17 12:14:52 content.go:620: post/demo.rst:547: (WARNING/2) Definition list ends without a blank line; unexpected unindent.
ERROR: 2016/10/17 12:14:52 content.go:620: post/demo.rst:89: (ERROR/3) Undefined substitution referenced: "problematic".
<snip/>

}
}
if err != nil {
jww.FATAL.Printf("%s rendering %s: %v", path, ctx.DocumentName, err)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FATAL is too extreme for this. Change it to ERROR.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok. Changed in be377b1

Add logging of the errors/warnings which rst2html outputs to its stderr
stream when rendering rst documents. Note that rst2html outputs warnings
and errors to stderr but it also adds them to the generated html. ->
hugo logs everything in stderr as error.

Add / complete adding page context (path to file being rendered) to
anything logged by getRstContent and getAsciidocContent.

See gohugoio#2570
@bep bep merged commit ddf2a34 into gohugoio:master Oct 19, 2016
@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants