Skip to content

Commit

Permalink
debug info
Browse files Browse the repository at this point in the history
  • Loading branch information
proggeramlug committed Feb 11, 2021
1 parent bd0df2c commit 8bef83f
Show file tree
Hide file tree
Showing 2 changed files with 96 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Sources/VaporAWSLambdaRuntime/ALB.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,14 @@ struct ALBHandler: EventLoopLambdaHandler {

init(application: Application, responder: Responder) {
self.application = application
print("responder: ", responder)
self.responder = responder
}

public func handle(context: Lambda.Context, event: ALB.TargetGroupRequest)
-> EventLoopFuture<ALB.TargetGroupResponse>
{
print("handling here")
let vaporRequest: Vapor.Request
do {
vaporRequest = try Vapor.Request(req: event, in: context, for: self.application)
Expand Down Expand Up @@ -76,6 +78,10 @@ extension Vapor.Request {
url += "?\(req.queryStringParameters)"
}

ctx.logger.debug("The constructed URL is: \(url)")
ctx.logger.debug("The incoming request is: ")
print("request: ", req)

self.init(
application: application,
method: NIOHTTP1.HTTPMethod(rawValue: req.httpMethod.rawValue),
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1240"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "Hello"
BuildableName = "Hello"
BlueprintName = "Hello"
ReferencedContainer = "container:">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "Hello"
BuildableName = "Hello"
BlueprintName = "Hello"
ReferencedContainer = "container:">
</BuildableReference>
</BuildableProductRunnable>
<EnvironmentVariables>
<EnvironmentVariable
key = "LOCAL_LAMBDA_SERVER_ENABLED"
value = "true"
isEnabled = "YES">
</EnvironmentVariable>
<EnvironmentVariable
key = "LOG_LEVEL"
value = "debug"
isEnabled = "YES">
</EnvironmentVariable>
</EnvironmentVariables>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "Hello"
BuildableName = "Hello"
BlueprintName = "Hello"
ReferencedContainer = "container:">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>

0 comments on commit 8bef83f

Please sign in to comment.