File tree Expand file tree Collapse file tree 6 files changed +22
-48
lines changed
aws-serverless-java-container-core/src/main/java/com/amazonaws/serverless/proxy
src/main/java/com/amazonaws/serverless/sample/jersey Expand file tree Collapse file tree 6 files changed +22
-48
lines changed Original file line number Diff line number Diff line change @@ -76,6 +76,10 @@ public class AwsProxyExceptionHandler
7676 @ Override
7777 public AwsProxyResponse handle (Throwable ex ) {
7878 log .error ("Called exception handler for:" , ex );
79+
80+ // adding a print stack trace in case we have no appender or we are running inside SAM local, where need the
81+ // output to go to the stderr.
82+ ex .printStackTrace ();
7983 if (ex instanceof InvalidRequestEventException ) {
8084 return new AwsProxyResponse (500 , headers , getErrorJson (INTERNAL_SERVER_ERROR ));
8185 } else {
Original file line number Diff line number Diff line change 4949 <version >${jersey.version} </version >
5050 </dependency >
5151
52+ <!-- https://mvnrepository.com/artifact/io.symphonia/lambda-logging -->
5253 <dependency >
53- <groupId >com.amazonaws </groupId >
54- <artifactId >aws- lambda-java-log4j </artifactId >
54+ <groupId >io.symphonia </groupId >
55+ <artifactId >lambda-logging </artifactId >
5556 <version >1.0.0</version >
5657 </dependency >
57- <dependency >
58- <groupId >org.slf4j</groupId >
59- <artifactId >slf4j-log4j12</artifactId >
60- <version >1.7.21</version >
61- </dependency >
58+
6259 </dependencies >
6360
6461 <build >
Original file line number Diff line number Diff line change 1515import com .amazonaws .serverless .sample .jersey .model .Pet ;
1616import com .amazonaws .serverless .sample .jersey .model .PetData ;
1717
18+ import org .slf4j .Logger ;
19+ import org .slf4j .LoggerFactory ;
20+
1821import javax .ws .rs .*;
1922import javax .ws .rs .core .MediaType ;
2023import javax .ws .rs .core .Response ;
Original file line number Diff line number Diff line change 3737 <version >[0.1,)</version >
3838 </dependency >
3939
40- <dependency >
41- <groupId >com.amazonaws</groupId >
42- <artifactId >aws-lambda-java-core</artifactId >
43- <version >1.1.0</version >
44- </dependency >
45-
46- <dependency >
47- <groupId >com.amazonaws</groupId >
48- <artifactId >aws-lambda-java-log4j</artifactId >
49- <version >1.0.0</version >
50- </dependency >
51-
5240 <!-- https://mvnrepository.com/artifact/com.sparkjava/spark-core -->
5341 <dependency >
5442 <groupId >com.sparkjava</groupId >
7765 <version >${jackson.version} </version >
7866 </dependency >
7967
68+ <!-- https://mvnrepository.com/artifact/io.symphonia/lambda-logging -->
8069 <dependency >
81- <groupId >org.slf4j </groupId >
82- <artifactId >slf4j-log4j12 </artifactId >
83- <version >1.7.21 </version >
70+ <groupId >io.symphonia </groupId >
71+ <artifactId >lambda-logging </artifactId >
72+ <version >1.0.0 </version >
8473 </dependency >
8574 </dependencies >
8675
Original file line number Diff line number Diff line change 5656 <version >${spring.version} </version >
5757 </dependency >
5858
59+ <!-- https://mvnrepository.com/artifact/io.symphonia/lambda-logging -->
5960 <dependency >
60- <groupId >com.fasterxml.jackson.core</groupId >
61- <artifactId >jackson-annotations</artifactId >
62- <version >${jackson.version} </version >
63- </dependency >
64- <dependency >
65- <groupId >com.fasterxml.jackson.core</groupId >
66- <artifactId >jackson-core</artifactId >
67- <version >${jackson.version} </version >
68- </dependency >
69- <dependency >
70- <groupId >com.fasterxml.jackson.core</groupId >
71- <artifactId >jackson-databind</artifactId >
72- <version >${jackson.version} </version >
73- </dependency >
74-
75- <dependency >
76- <groupId >com.amazonaws</groupId >
77- <artifactId >aws-lambda-java-log4j</artifactId >
61+ <groupId >io.symphonia</groupId >
62+ <artifactId >lambda-logging</artifactId >
7863 <version >1.0.0</version >
7964 </dependency >
80- <dependency >
81- <groupId >org.slf4j</groupId >
82- <artifactId >slf4j-log4j12</artifactId >
83- <version >1.7.21</version >
84- </dependency >
8565 </dependencies >
8666
8767 <build >
Original file line number Diff line number Diff line change 2525 <version >[0.1,)</version >
2626 </dependency >
2727
28+ <!-- https://mvnrepository.com/artifact/io.symphonia/lambda-logging -->
2829 <dependency >
29- <groupId >com.amazonaws </groupId >
30- <artifactId >aws- lambda-java-core </artifactId >
31- <version >1.1 .0</version >
30+ <groupId >io.symphonia </groupId >
31+ <artifactId >lambda-logging </artifactId >
32+ <version >1.0 .0</version >
3233 </dependency >
3334 </dependencies >
3435
You can’t perform that action at this time.
0 commit comments