Skip to content

Commit e123d60

Browse files
Remove Logging
1 parent ff3326e commit e123d60

File tree

2 files changed

+3
-17
lines changed

2 files changed

+3
-17
lines changed

Examples/LambdaFunctions/Sources/ProductAPI/ProductLambdaHandler.swift

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,10 @@ struct ProductLambdaHandler: EventLoopLambdaHandler {
2525
let service: ProductService
2626
let operation: Operation
2727

28-
func handle(context: Lambda.Context, event: APIGateway.V2.Request) -> EventLoopFuture<
29-
APIGateway.V2.Response
30-
> {
28+
func handle(context: Lambda.Context, event: APIGateway.V2.Request) -> EventLoopFuture<APIGateway.V2.Response> {
3129

3230
switch operation {
3331
case .create:
34-
logger.info("create")
3532
let create = CreateLambdaHandler(service: service).handle(context: context, event: event)
3633
.flatMap { response -> EventLoopFuture<APIGateway.V2.Response> in
3734
switch response {
@@ -45,7 +42,6 @@ struct ProductLambdaHandler: EventLoopLambdaHandler {
4542
}
4643
return create
4744
case .read:
48-
logger.info("read")
4945
let read = ReadLambdaHandler(service: service).handle(context: context, event: event)
5046
.flatMap { response -> EventLoopFuture<APIGateway.V2.Response> in
5147
switch response {
@@ -59,7 +55,6 @@ struct ProductLambdaHandler: EventLoopLambdaHandler {
5955
}
6056
return read
6157
case .update:
62-
logger.info("update")
6358
let update = UpdateLambdaHandler(service: service).handle(context: context, event: event)
6459
.flatMap { response -> EventLoopFuture<APIGateway.V2.Response> in
6560
switch response {
@@ -73,7 +68,6 @@ struct ProductLambdaHandler: EventLoopLambdaHandler {
7368
}
7469
return update
7570
case .delete:
76-
logger.info("delete")
7771
let delete = DeleteUpdateLambdaHandler(service: service).handle(
7872
context: context, event: event
7973
)
@@ -89,7 +83,6 @@ struct ProductLambdaHandler: EventLoopLambdaHandler {
8983
}
9084
return delete
9185
case .list:
92-
logger.info("list")
9386
let list = ListUpdateLambdaHandler(service: service).handle(context: context, event: event)
9487
.flatMap { response -> EventLoopFuture<APIGateway.V2.Response> in
9588
switch response {
@@ -113,9 +106,7 @@ struct ProductLambdaHandler: EventLoopLambdaHandler {
113106
self.service = service
114107
}
115108

116-
func handle(context: Lambda.Context, event: APIGateway.V2.Request) -> EventLoopFuture<
117-
Result<Product, Error>
118-
> {
109+
func handle(context: Lambda.Context, event: APIGateway.V2.Request) -> EventLoopFuture<Result<Product, Error>> {
119110

120111
guard let product: Product = try? event.object() else {
121112
let error = APIError.invalidRequest
@@ -137,9 +128,7 @@ struct ProductLambdaHandler: EventLoopLambdaHandler {
137128
self.service = service
138129
}
139130

140-
func handle(context: Lambda.Context, event: APIGateway.V2.Request) -> EventLoopFuture<
141-
Result<Product, Error>
142-
> {
131+
func handle(context: Lambda.Context, event: APIGateway.V2.Request) -> EventLoopFuture<Result<Product, Error>> {
143132

144133
guard let sku = event.pathParameters?["sku"] else {
145134
let error = APIError.invalidRequest

Examples/LambdaFunctions/Sources/ProductAPI/main.swift

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,5 @@
1313
//===----------------------------------------------------------------------===//
1414

1515
import AWSLambdaRuntime
16-
import Logging
17-
18-
let logger = Logger(label: "AWS.Lambda.Products")
1916

2017
Lambda.run(ProductLambda.init)

0 commit comments

Comments
 (0)