Expose setting logging configuration per method
See original GitHub issueThis is a Feature Proposal
Description
This may be marked as a duplicate of #1918 but I don’t believe it is a duplicate.
I would like to see the ability to specify logging configuration at the http event level. So something like this:
functions:
api:
name: ${self:provider.stage}-api
handler: wsgi.handler
environment: ${self:custom.env.environment}
events:
- http:
method: GET
path: /user/{user_id}
logging:
level: INFO
metrics: true
dataTraceEnabled: false
Similar or dependent issues:
Issue Analytics
- State:
- Created 6 years ago
- Reactions:11
- Comments:7 (5 by maintainers)
Top Results From Across the Web
logging.config — Logging configuration — Python 3.11.1 ...
The schema describes a set of logging objects - loggers, handlers, formatters, filters - which are connected to each other in an object...
Read more >26. Logging - Spring
Default configurations are provided for Java Util Logging, Log4J2, and Logback. In each case, loggers are pre-configured to use console output with optional ......
Read more >Configure the Logging agent | Google Cloud
When set to prometheus , the Logging agent exposes metrics in Prometheus format on the Prometheus endpoint ( localhost:24231/metrics by default; ...
Read more >Changing the Logging Level at the Runtime for a Spring Boot ...
In this tutorial, we're going to look at ways we can change the logging level of a Spring Boot application at runtime. As...
Read more >Python Logging Guide - Best Practices and Hands-on Examples
A logger processes a log request if the numeric value of the requested logging level is greater than or equal to the numeric...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thanks for the feedback and the description of the use case @briguy202
Yes, that’s exactly what we’re going to do in the future. We’ll prepend everything with the provider. So e.g.
aws-logging
.Generally speaking we’re looking at issues where we got the most feedback and which provide the most value for the largest chunk of users. It’s always the problem of great, new functionality vs. adding technical debt.
However there’s always the possibility to write a plugin which supports the requested functionality. Sometimes in the past we’ve migrated the plugin codebase into core after seeing a widespread adoption and need for the plugin.
I will add this feature (including all other possible stage configurations like throttling, caching, etc.) to the alias plugin. See https://github.com/HyperBrain/serverless-aws-alias/issues/57. Even if you do not make use of aliased deployments, you can benefit from the feature.