It is better to log errors on error log level. Debug will hide the problem when the code is executed in production. Typical log levels in production are INFO, WARNING or even ERROR.