Hugo: Missing small but important logging information when using watch

Created on 13 Jul 2017  路  4Comments  路  Source: gohugoio/hugo

I had problems locating which file was throwing an error:

Using hugo -w mode and -verboseLog, the following logging appears on log file:

INFO 2017/07/13 14:14:01 Using config file:
INFO 2017/07/13 14:14:01 /var/www/html/hugo/static/ is the only static directory available to sync from
INFO 2017/07/13 14:14:01 syncing static files to /var/www/html/hugo/public/
LOG: 2017/07/13 14:14:01 Started building sites ...
ERROR 2017/07/13 14:14:04 unable to read frontmatter at filepos 364: EOF

HERE HUGO FINALLY CRASH AND IS BEING RESTARTED BY A CRON JOB

INFO 2017/07/13 14:15:14 Using config file:
INFO 2017/07/13 14:15:14 /var/www/html/hugo/static/ is the only static directory available to sync from
INFO 2017/07/13 14:15:14 syncing static files to /var/www/html/hugo/public/
LOG: 2017/07/13 14:15:14 Started building sites ...
ERROR 2017/07/13 14:15:16 unable to read frontmatter at filepos 364: EOF

When I use start manually hugo (without -w mode), I also get the same error but it's finally followed by a very useful information in the console, the file which causes the error ;-)

Started building sites ...
ERROR 2017/07/13 14:31:54 unable to read frontmatter at filepos 364: EOF
Error: Error building site: Errors reading pages: Error: unable to read frontmatter at filepos 364: EOF for actualitedanslereseauboyeratoursle26aout2016-tours-37000-182528.md

HERE HUGO FINALLY CRASH BUT I DONT CARE, I KNOW WHERE TO SEARCH ####

should be very nice if logging could log the file name even in watch mode.

Bug

Most helpful comment

I'll have a look at this one.

All 4 comments

I haven't noticed, but thanks a lot for the report -- this we should fix.

I'll have a look at this one.

@bep How come this keeps getting pushed back through releases?

v0.34 does NOT show the file name that caused the error. verbose, verboseLog, w .... none of the options show the log as shown in @axi's original comment above.

I had to binary chop to get to the files. I see someone has submitted a pr #3970 already.

Was this page helpful?
0 / 5 - 0 ratings