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
76
76
@ Override
77
77
public AwsProxyResponse handle (Throwable ex ) {
78
78
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 ();
79
83
if (ex instanceof InvalidRequestEventException ) {
80
84
return new AwsProxyResponse (500 , headers , getErrorJson (INTERNAL_SERVER_ERROR ));
81
85
} else {
Original file line number Diff line number Diff line change 49
49
<version >${jersey.version} </version >
50
50
</dependency >
51
51
52
+ <!-- https://mvnrepository.com/artifact/io.symphonia/lambda-logging -->
52
53
<dependency >
53
- <groupId >com.amazonaws </groupId >
54
- <artifactId >aws- lambda-java-log4j </artifactId >
54
+ <groupId >io.symphonia </groupId >
55
+ <artifactId >lambda-logging </artifactId >
55
56
<version >1.0.0</version >
56
57
</dependency >
57
- <dependency >
58
- <groupId >org.slf4j</groupId >
59
- <artifactId >slf4j-log4j12</artifactId >
60
- <version >1.7.21</version >
61
- </dependency >
58
+
62
59
</dependencies >
63
60
64
61
<build >
Original file line number Diff line number Diff line change 15
15
import com .amazonaws .serverless .sample .jersey .model .Pet ;
16
16
import com .amazonaws .serverless .sample .jersey .model .PetData ;
17
17
18
+ import org .slf4j .Logger ;
19
+ import org .slf4j .LoggerFactory ;
20
+
18
21
import javax .ws .rs .*;
19
22
import javax .ws .rs .core .MediaType ;
20
23
import javax .ws .rs .core .Response ;
Original file line number Diff line number Diff line change 37
37
<version >[0.1,)</version >
38
38
</dependency >
39
39
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
-
52
40
<!-- https://mvnrepository.com/artifact/com.sparkjava/spark-core -->
53
41
<dependency >
54
42
<groupId >com.sparkjava</groupId >
77
65
<version >${jackson.version} </version >
78
66
</dependency >
79
67
68
+ <!-- https://mvnrepository.com/artifact/io.symphonia/lambda-logging -->
80
69
<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 >
84
73
</dependency >
85
74
</dependencies >
86
75
Original file line number Diff line number Diff line change 56
56
<version >${spring.version} </version >
57
57
</dependency >
58
58
59
+ <!-- https://mvnrepository.com/artifact/io.symphonia/lambda-logging -->
59
60
<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 >
78
63
<version >1.0.0</version >
79
64
</dependency >
80
- <dependency >
81
- <groupId >org.slf4j</groupId >
82
- <artifactId >slf4j-log4j12</artifactId >
83
- <version >1.7.21</version >
84
- </dependency >
85
65
</dependencies >
86
66
87
67
<build >
Original file line number Diff line number Diff line change 25
25
<version >[0.1,)</version >
26
26
</dependency >
27
27
28
+ <!-- https://mvnrepository.com/artifact/io.symphonia/lambda-logging -->
28
29
<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 >
32
33
</dependency >
33
34
</dependencies >
34
35
You can’t perform that action at this time.
0 commit comments