Logging
Enable logging to inspect events while building your project.
Command line
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
If you do not specify a logging level with the --logLevel flag, Hugo displays warning and error messages.
Template functions
Use these template functions to log messages to the console, such as data validation errors or missing files.
fmt.Errorf- Logs an ERROR from a template.
fmt.Erroridf- Logs a suppressible ERROR from a template.
fmt.Warnf- Logs a WARNING from a template.
fmt.Warnidf- Logs a suppressible WARNING from a template.
LiveReload
To log Hugo’s LiveReload requests in your browser, add this query string to the URL when running Hugo’s development server:
debug=LR-verboseFor example, visit this URL:
http://localhost:1313/?debug=LR-verboseThen monitor the reload requests in the console of your browser’s developer tools. Enable the “preserve log” option in the developer tools.
Last updated:
November 23, 2026
:
content: Apply style guide to troubleshooting pages (735740488)
Improve this page