hugo/hugolib
Bjørn Erik Pedersen c97dae40d9 hugolib: Use Page Kind in template errors to prevent log spam
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.
2017-04-02 12:22:54 +02:00
..
testdata
404_test.go hugolib: Add 404 test 2017-03-27 15:43:56 +02:00
alias.go tpl: Rework to handle both text and HTML templates 2017-04-02 11:37:30 +02:00
alias_test.go hugolib, output: Handle aliases for all HTML formats 2017-03-27 15:43:56 +02:00
author.go
case_insensitive_test.go
config.go Remove the now superflous defaultExtension 2017-03-27 15:43:56 +02:00
config_test.go
datafiles_test.go
disableKinds_test.go
embedded_shortcodes_test.go tpl: Rework to handle both text and HTML templates 2017-04-02 11:37:30 +02:00
gitinfo.go
handler_base.go hugolib: Clean up redundant frontmatter error logging 2017-03-10 23:22:43 +01:00
handler_file.go hugolib: Remove siteWriter 2017-03-27 15:43:56 +02:00
handler_meta.go
handler_page.go
handler_test.go Remove the now superflous defaultExtension 2017-03-27 15:43:56 +02:00
hugo_info.go
hugo_sites.go tpl: Rework to handle both text and HTML templates 2017-04-02 11:37:30 +02:00
hugo_sites_build.go hugolib: Update site stats to take output formats into account 2017-03-27 15:43:56 +02:00
hugo_sites_build_test.go Remove the now superflous defaultExtension 2017-03-27 15:43:56 +02:00
media.go
menu.go
menu_old_test.go hugolib: More TODO fixes 2017-03-27 15:43:56 +02:00
menu_test.go
multilingual.go
node_as_page_test.go hugolib: Refactor/-work the permalink/target path logic 2017-03-27 15:43:56 +02:00
page.go tpl: Rework to handle both text and HTML templates 2017-04-02 11:37:30 +02:00
page_collections.go hugolib: Fix reloading corner cases for shortcodes 2017-03-11 20:21:06 +01:00
page_output.go tpl: Rework to handle both text and HTML templates 2017-04-02 11:37:30 +02:00
page_paths.go hugolib: Fix panic for Permalink in 404 etc. templates 2017-03-27 15:43:56 +02:00
page_paths_test.go output: Rename HTMLType etc. to HTMLFormat 2017-03-27 15:43:56 +02:00
page_permalink_test.go Remove the now superflous defaultExtension 2017-03-27 15:43:56 +02:00
page_taxonomy_test.go
page_test.go Remove the now superflous defaultExtension 2017-03-27 15:43:56 +02:00
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 hugolib: Refactor/-work the permalink/target path logic 2017-03-27 15:43:56 +02:00
pagination_test.go output: Rename HTMLType etc. to HTMLFormat 2017-03-27 15:43:56 +02:00
path_separators_test.go hugolib, output: Incorporate suffix and type in layout resolve 2017-03-27 15:43:56 +02:00
permalinks.go
permalinks_test.go
robotstxt_test.go
rss_test.go
scratch.go
scratch_test.go
shortcode.go tpl: Rework to handle both text and HTML templates 2017-04-02 11:37:30 +02:00
shortcode_test.go tpl: Rework to handle both text and HTML templates 2017-04-02 11:37:30 +02:00
shortcodeparser.go
shortcodeparser_test.go
site.go hugolib: Use Page Kind in template errors to prevent log spam 2017-04-02 12:22:54 +02:00
site_output.go output: Rename HTMLType etc. to HTMLFormat 2017-03-27 15:43:56 +02:00
site_output_test.go tpl: Rework to handle both text and HTML templates 2017-04-02 11:37:30 +02:00
site_render.go hugolib: Use Page Kind in template errors to prevent log spam 2017-04-02 12:22:54 +02:00
site_test.go tpl: Rework to handle both text and HTML templates 2017-04-02 11:37:30 +02:00
site_url_test.go
siteJSONEncode_test.go
sitemap.go
sitemap_test.go tpl: Rework to handle both text and HTML templates 2017-04-02 11:37:30 +02:00
taxonomy.go
taxonomy_test.go hugolib: Refactor/-work the permalink/target path logic 2017-03-27 15:43:56 +02:00
template_engines_test.go
template_test.go hugolib: Add section template baseof test case 2017-03-02 13:52:08 +01:00
testhelpers_test.go tpl: Rework to handle both text and HTML templates 2017-04-02 11:37:30 +02:00
translations.go hugolib: Remove unnecessary params 2017-03-08 12:28:56 +01:00