[ 
https://issues.apache.org/jira/browse/FINERACT-1168?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17212019#comment-17212019
 ] 

Michael Vorburger commented on FINERACT-1168:
---------------------------------------------

[~ptuomola] agreed that what you describe above is indeed likely a much better 
approach than what I originally outlined. So we need:

1. {{./gradlew integrationTest}} needs to show our regular Spring Boot 
Application log (like e.g. {{./gradlew bootRun}} or {{java -jar *.jar}} does. 
It currently does not, and I have not figured out yet how to do that... 
remembering FINERACT-888 and 
[https://github.com/apache/fineract/commits/develop/fineract-provider/src/main/resources/logback.xml],
 we now just log to STDOUT. But either 
[https://github.com/bmuschko/gradle-cargo-plugin] or Gradle itself seems to 
capture and swallow and redirect that somehow? 
[https://github.com/bmuschko/gradle-cargo-plugin] says something about a 
_logFile_ property for _The Cargo log file of your local container (defaults to 
writing to the console)_ - but that doesn't quite seem to work? Or I'm missing 
up what's what here... Whatever the reason, the output of {{./gradlew 
integrationTest}} currently only includes test output, and nothing from 
Spring/Tomcat (except {{WARNING: Could not execute query 
org.drizzle.jdbc.internal.common.query.DrizzleParameterizedQuery@...}}, which 
may be sent to STDERR by Drizzle?)

2. If we solve 1. then, remembering FINERACT-732, we should make it log only 
WARN and ERROR, but not INFO, during {{./gradlew integrationTest}}. As we don't 
have a custom {{logback.xml}} (anymore) and use Spring's "zero config" logging, 
I suspect will somehow be possible by setting a system property in the Cargo 
Gradle plugin to forward to Tomcat, using 
[https://docs.spring.io/spring-boot/docs/current/reference/html/howto.html#howto-logging].
 But it's moot until we solve 1.

3. For this to really work and be fully useful, there are various logging 
related clean ups that could be useful. I propose that we deal with those in 
more fine grained separate issues, and have linked existing ones that I am 
aware of which are vaguely related to this issue, and create a few new ones.

[~aleks] FYI just in case you would like to chime in here, some time (no rush).

> Integration Tests failure due to internal server errors should show server 
> side failure stack trace
> ---------------------------------------------------------------------------------------------------
>
>                 Key: FINERACT-1168
>                 URL: https://issues.apache.org/jira/browse/FINERACT-1168
>             Project: Apache Fineract
>          Issue Type: Improvement
>            Reporter: Michael Vorburger
>            Priority: Blocker
>
> IT failures like FINERACT-1167, already raised in FINERACT-927, are a PITA 
> (impossible) to debug.
> This is an IT failure due to a #500 means "something internal went wrong on 
> the server" - but we don't know what...
> To know what the problem was, the server should return the exception in the 
> HTTP body of the 500 response. The IT should then capture that, and include 
> it in the JUnit test failure.
> But in production, 500 errors should NOT show the stack trace - that is 
> typically considered a security problem. So we need some env var / sys prop 
> to enable it, just for debugging. Spring Boot probably actually already has 
> some... knob, for this?
> [~ptuomola] thought this may interest you.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to