mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-07 20:30:36 -05:00
c97dae40d9
Having the content page name in the log key for the distinct error logger isnt't very usable when you have an error in a commonly used partial. Using the Page Kind reduces the amount of log entries. Here is an example from an error in the partial menu.html, used in all the page templates: ``` Started building sites ... ERROR 2017/04/02 12:19:43 Error while rendering "page": template: /Users/bep/sites/bepsays.com/layouts/_default/single.html:17:7: executing "/Users/bep/sites/bepsays.com/layouts/_default/single.html" at <partial "menu.html" ...>: error calling partial: template: partials/menu.html:9:11: executing "partials/menu.html" at <.DoesNotExist>: can't evaluate field DoesNotExist in type *hugolib.PageOutput ERROR 2017/04/02 12:19:43 Error while rendering "section": template: /Users/bep/sites/bepsays.com/layouts/_default/section.html:17:7: executing "/Users/bep/sites/bepsays.com/layouts/_default/section.html" at <partial "menu.html" ...>: error calling partial: template: partials/menu.html:9:11: executing "partials/menu.html" at <.DoesNotExist>: can't evaluate field DoesNotExist in type *hugolib.PageOutput ERROR 2017/04/02 12:19:43 Error while rendering "taxonomy": template: /Users/bep/sites/bepsays.com/layouts/_default/list.html:17:7: executing "/Users/bep/sites/bepsays.com/layouts/_default/list.html" at <partial "menu.html" ...>: error calling partial: template: partials/menu.html:9:11: executing "partials/menu.html" at <.DoesNotExist>: can't evaluate field DoesNotExist in type *hugolib.PageOutput ERROR 2017/04/02 12:19:43 Error while rendering "home": template: /Users/bep/sites/bepsays.com/layouts/index.html:17:7: executing "/Users/bep/sites/bepsays.com/layouts/index.html" at <partial "menu.html" ...>: error calling partial: template: partials/menu.html:9:11: executing "partials/menu.html" at <.DoesNotExist>: can't evaluate field DoesNotExist in type *hugolib.PageOutput ERROR 2017/04/02 12:19:43 Error while rendering "404": template: 404.html:2:3: executing "404.html" at <partial "menu.html" ...>: error calling partial: template: partials/menu.html:9:11: executing "partials/menu.html" at <.DoesNotExist>: can't evaluate field DoesNotExist in type *hugolib.PageOutput Built site for language nn: ``` Which is pretty good. |
||
---|---|---|
.. | ||
testdata | ||
404_test.go | ||
alias.go | ||
alias_test.go | ||
author.go | ||
case_insensitive_test.go | ||
config.go | ||
config_test.go | ||
datafiles_test.go | ||
disableKinds_test.go | ||
embedded_shortcodes_test.go | ||
gitinfo.go | ||
handler_base.go | ||
handler_file.go | ||
handler_meta.go | ||
handler_page.go | ||
handler_test.go | ||
hugo_info.go | ||
hugo_sites.go | ||
hugo_sites_build.go | ||
hugo_sites_build_test.go | ||
media.go | ||
menu.go | ||
menu_old_test.go | ||
menu_test.go | ||
multilingual.go | ||
node_as_page_test.go | ||
page.go | ||
page_collections.go | ||
page_output.go | ||
page_paths.go | ||
page_paths_test.go | ||
page_permalink_test.go | ||
page_taxonomy_test.go | ||
page_test.go | ||
page_time_integration_test.go | ||
pageCache.go | ||
pageCache_test.go | ||
pageGroup.go | ||
pageGroup_test.go | ||
pageSort.go | ||
pageSort_test.go | ||
pagesPrevNext.go | ||
pagesPrevNext_test.go | ||
pagination.go | ||
pagination_test.go | ||
path_separators_test.go | ||
permalinks.go | ||
permalinks_test.go | ||
robotstxt_test.go | ||
rss_test.go | ||
scratch.go | ||
scratch_test.go | ||
shortcode.go | ||
shortcode_test.go | ||
shortcodeparser.go | ||
shortcodeparser_test.go | ||
site.go | ||
site_output.go | ||
site_output_test.go | ||
site_render.go | ||
site_test.go | ||
site_url_test.go | ||
siteJSONEncode_test.go | ||
sitemap.go | ||
sitemap_test.go | ||
taxonomy.go | ||
taxonomy_test.go | ||
template_engines_test.go | ||
template_test.go | ||
testhelpers_test.go | ||
translations.go |