Skip to content

Commit

Permalink
Set log level to debug for test instances
Browse files Browse the repository at this point in the history
  • Loading branch information
theotherp committed Dec 1, 2024
1 parent 470da01 commit f1b25a8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,13 @@ public HydraErrorController(ErrorAttributes errorAttributes) {
@RequestMapping("/error")
public ModelAndView handleError(HttpServletRequest request, HttpServletResponse response, Object handler) {
ModelAndView errorPage = new ModelAndView("error");

WebRequest webRequest = new ServletWebRequest(request);
Throwable ex = new DefaultErrorAttributes().getError(webRequest);
if (ex != null) {
errorPage.addObject("exception", StackTraceFilter.getFilteredStackTrace(ex));
errorPage.addObject("error", ex.getMessage());
//Log for good measure, perhaps it wasn't already logged
log.debug("Handling exception", ex);
} else {
log.error("Cannot show filtered exception because it's null");
}
Expand Down
1 change: 1 addition & 0 deletions tests/system/src/main/java/org/nzbhydra/BeforeAll.java
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ public void init() throws Exception {
config.getMain().setApiKey("apikey");
config.getMain().getLogging().setLogIpAddresses(true);
config.getMain().getLogging().setLogUsername(true);
config.getMain().getLogging().setConsolelevel("DEBUG");
configManager.setConfig(config);
indexerConfigurer.configureTwoMockIndexers();
downloaderConfigurer.configureSabnzbdMock();
Expand Down

0 comments on commit f1b25a8

Please sign in to comment.