docs/content/en/troubleshooting/logging.md
Enable console logging with the --logLevel command line flag.
Hugo has four logging levels:
error : Display error messages only.
hugo build --logLevel error
warn : Display warning and error messages.
hugo build --logLevel warn
info : Display information, warning, and error messages.
hugo build --logLevel info
debug : Display debug, information, warning, and error messages.
hugo build --logLevel debug
[!note] If you do not specify a logging level with the
--logLevelflag, warnings and errors are always displayed.
You can also use template functions to print warnings or errors to the console. These functions are typically used to report data validation errors, missing files, etc.
{{% render-list-of-pages-in-section path=/functions/fmt filter=functions_fmt_logging filterType=include %}}
To log Hugo's LiveReload requests in your browser, add this query string to the URL when running Hugo's development server:
debug=LR-verbose
For example:
http://localhost:1313/?debug=LR-verbose
Then monitor the reload requests in your browser's dev tools console. Make sure the dev tools "preserve log" option is enabled.