Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make sure TRACE log level exists in runtime v2 #404

Open
sebsto opened this issue Oct 10, 2024 · 1 comment
Open

Make sure TRACE log level exists in runtime v2 #404

sebsto opened this issue Oct 10, 2024 · 1 comment
Assignees
Labels
area/testing Improvements to tests. good first issue Good for newcomers kind/enhancement Improvements to existing feature. kind/usability Usability of generated code, ergonomics. semver/none No version bump required. size/S Small task. (A couple of hours of work.)

Comments

@sebsto
Copy link
Contributor

sebsto commented Oct 10, 2024

Verify if this change has been kept in v2
2219782

@sebsto
Copy link
Contributor Author

sebsto commented Oct 10, 2024

@fabianfett

This is the code from v1

            // when log level is trace or lower, print the first Kb of the payload
            if logger.logLevel <= .trace, let buffer = bytes.getSlice(at: 0, length: max(bytes.readableBytes, 1024)) {
                logger.trace("sending invocation to lambda handler",
                             metadata: ["1024 first bytes": .string(String(buffer: buffer))])
            } else {
                logger.debug("sending invocation to lambda handler")
            }

Where is the good place to add this code ?
Is it in Lambda.runLoop() ?

https://github.com/swift-server/swift-aws-lambda-runtime/blob/main/Sources/AWSLambdaRuntimeCore/Lambda.swift#L39

Or in the Handler ?
https://github.com/swift-server/swift-aws-lambda-runtime/blob/main/Sources/AWSLambdaRuntimeCore/LambdaHandlers.swift#L172

@sebsto sebsto self-assigned this Dec 25, 2024
@sebsto sebsto added kind/enhancement Improvements to existing feature. good first issue Good for newcomers semver/none No version bump required. kind/usability Usability of generated code, ergonomics. size/S Small task. (A couple of hours of work.) area/testing Improvements to tests. labels Dec 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/testing Improvements to tests. good first issue Good for newcomers kind/enhancement Improvements to existing feature. kind/usability Usability of generated code, ergonomics. semver/none No version bump required. size/S Small task. (A couple of hours of work.)
Projects
None yet
Development

No branches or pull requests

1 participant