-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Revamp AbstractLogger in log4j-kit
#2291
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
Conversation
|
"SDK" implies to me something big, not an API, while "SPI" implies something like a template to be implemented or classes to be extended. |
059f3ae to
2eab1a5
Compare
I don't like calling things SDK either, but I like a simple rule to determine the main package name from the artifact name. |
2eab1a5 to
f922379
Compare
|
Please no enumerated naming, e.g., I am fine with
|
8db1575 to
ba4b732
Compare
log4j-sdk/src/main/java/org/apache/logging/log4j/sdk/logger/AbstractLogger.java
Show resolved
Hide resolved
|
What name would you propose? Regardless of the naming of the artifact can you review the AbstractLogger class? There are some new methods like Since this PR targets the feature branch |
In order for Log4j Core 3.x not to depend on the utility classes in Log4j API 2.x, we provide a new `AbstractLogger` in `log4j-sdk`.
After some minor corrections flow message methods are also immediately inlineable.
2dc9115 to
1138990
Compare
vy
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change is massive; maybe not in size, but its implications. I am not able to see anything fishy. But I guess we will iron out most wrinkles along the way.
log4j-sdk/src/main/java/org/apache/logging/log4j/sdk/logger/AbstractLogger.java
Show resolved
Hide resolved
log4j-sdk/src/test/java/org/apache/logging/log4j/sdk/logger/AbstractLoggerTest.java
Show resolved
Hide resolved
|
@vy and @garydgregory, I renamed the module to |
c0e8ff5 to
d31e9e4
Compare
AbstractLogger in log4j-sdkAbstractLogger in log4j-kit
In order for Log4j Core 3.x not to depend on the utility classes in Log4j API 2.x, we provide a new
AbstractLoggerinlog4j-sdk.The main improvements to this
AbstractLoggerare:Messageand log" methods and filter methods. The most important methods are at the beginning.logMessageSafelymessage has an additionalStackTraceElementparameter and all the logging methods are routed through it,AbstractLoggerTest. It is basically impossible for unrolled vararg methods with more than 2 parameters and methods that use supplier to follow a 100% inline-able path.doLog(formerlylog) andisEnabled(Level, Marker).Part of #2290