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

Enable LoggingConfig configuration on Lambda Functions #12264

Closed
1 task done
samchungy opened this issue Nov 17, 2023 · 6 comments · May be fixed by #12315
Closed
1 task done

Enable LoggingConfig configuration on Lambda Functions #12264

samchungy opened this issue Nov 17, 2023 · 6 comments · May be fixed by #12315

Comments

@samchungy
Copy link
Contributor

Is there an existing issue for this?

  • I have searched existing issues, it hasn't been reported yet

Use case description

https://aws.amazon.com/blogs/compute/introducing-advanced-logging-controls-for-aws-lambda-functions/

Recently announced, would be nice to be able to configure

Proposed solution (optional)

No response

@ryy
Copy link

ryy commented Nov 20, 2023

Looking at the documentation, it seems that defining LoggingConfig is a good idea.

What about the following settings?

functions:
  hello:
    ...
    loggingConfig:
      applicationLogLevel: <value>
      logFormat: <value>
      logGroup: <value>
      systemLogLevel: <value>

Can I please be assigned to this one?

@JaredAAT
Copy link

Whilst we're waiting for feedback, anyone who needs this functionality now can look towards: https://www.npmjs.com/package/serverless-logging-config

@mbertrand-kintsugi
Copy link

Maybe the issue I opened over at #12284 should be folded into this one? It's asking for pretty much the same thing. When I wrote it, I honestly didn't even know it was a new feature. I just assumed everyone supported json through and through these days.

@tomaszjezierski-olx
Copy link

Hey, this feature looks great and would allow us to reduce the cost. I have one question: shouldn't be there a possibility to set the LoggingConfig also on the provider level? Each Lambda probably is going to share the same configuration for logging, so it will reduce the boilerplate.

@ac360
Copy link
Member

ac360 commented Mar 17, 2024

Thank you for your input. We've implemented the requested feature in V.4, available for both Provider and Function settings. For the correct YAML usage, check out the serverless.yml documentation, and for the function examples, simply scroll down. We're aware of an inconsistency with a titlecase YAML property. Rest assured, this will be corrected by Monday, as noted in this issue.

@ac360 ac360 closed this as completed Mar 17, 2024
@ac360
Copy link
Member

ac360 commented Mar 18, 2024

Looks like that was just a documentation typo and the YAML implementation correctly uses camelCase. This feature is ready to go.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants