Comments (3)
Hey @dgomesbr Thanks for opening an RFC.
I have few immediate questions/comments on this:
- Are you thinking that annotation should work like that from lombok in the sense that it should modify byte code to generate log fields for user or just exposing an api from power tool to provide access to logger instance ?
- If its the former, my concerns are how would the IDE experience look like? Lombok has plugin support in IDE like intellij etc.
- Goal of powertools logging annotation is to take away heavy lifting of injecting information from lambda context. It's not meant to replace current logging configuration in your lambda functions. You can still use lombok in your lambda functions to make it generate log4j2 logger instance if you want to. As of today the annotation only take effect when use on lambda handleRequest method.
Those are my thoughts around it.
I would still be ok to consider exposing an api method which could give you access to a logger instance, something like PowertoolsLogger.get()
and that gives you access to a logger from log4j2, although I am not sure how much value it adds.
from powertools-lambda-java.
Fair consideration. My thoughts were if we're pushing the Json Schema, the Log4J2 as best practice, why not generate the log instance itself.
Since bytecode is generated at design time, and not runtime, also don't foresee issues with the performance.
Oth, great points on the IDE support, I guess I have mixed feelings on that.
Maybe then expose this as a member annotation? @LoggerInstance
?
Or maybe we drop it altogether.
from powertools-lambda-java.
Fair consideration. My thoughts were if we're pushing the Json Schema, the Log4J2 as best practice, why not generate the log instance itself.
Since bytecode is generated at design time, and not runtime, also don't foresee issues with the performance.
Oth, great points on the IDE support, I guess I have mixed feelings on that.Maybe then expose this as a member annotation?
@LoggerInstance
?
Or maybe we drop it altogether.
@LoggerInstance
annotation is an option but I am still doubtful on the value that it will add as the only purpose of it will be to provide logger instance and then clients are free to choose any code generators library like lombok for example. I think it at this point it deviates from our tenets as well. At this point, I am tempted to drop it altogether.
So if you agree with this, feel free to close the issue or else let us know the thoughts further :)
from powertools-lambda-java.
Related Issues (20)
- Log level not restored at the end of execution HOT 2
- Support batch secrets retrieval in Parameters module HOT 6
- Maintenance: update jackson and aws-xray-recorder dependencies together HOT 4
- RFC: handle batch messages in parallel in batch module HOT 13
- v2: Example logging configuration needs to be updated HOT 3
- v2 - Params builders do not supply default TransformationManager HOT 1
- bug - v2 - end-to-end tests broken
- AbstractCustomResourceHandler - Unable to send response HOT 2
- LambdaEcsLayout seems to incorrectly serialize the service field HOT 7
- Add support for CRaC
- RFC: support for multi-endpoint HTTP handler Lambda functions HOT 9
- Docs: Add Powertools for AWS Lambda workshop to documentation
- Propagation of request information across thread boundaries HOT 2
- Propagate traces and log context to non-main threads HOT 4
- AppConfig "empty" response handling HOT 4
- Error upgrading aws-java-sdk-v2 monrepo HOT 8
- [Support Powertools for AWS Lambda (Java)]: <your organization name> HOT 1
- RFC: Support Micronaut and Spring Cloud Function (and more?) HOT 5
- Maintenance: update docs to use self-hosted mermaid.js script
- Feature request: Simplify experience in discovering how much time left before Idempotency record expiration
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from powertools-lambda-java.