-
Notifications
You must be signed in to change notification settings - Fork 123
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
Log4j2 - Ignores %line and incorrect logger name #144
Comments
You've already raised this. |
Hi, I was under the impression that it is different because here I am using the log4j2 backend directly (flogger-log4j2-backend). The attached project is also different from the project attached in issue #140 |
True, but fixing one will inevitably fix the other. SLF4J + log4J2 backend is going to be almost exactly the same same code, just with a very thin layer in SLF4J. To be honest I'd rather we didn't even have and SLF4J "backend" (since SLF4J is not a logging backend API). |
OK. Thanks for the clarification.
Yes, I see your point. A direct backend is obviously preferable but on the other hand, "SLF4J backend" acts as a bridge to many popular backends as most of the logging frameworks already have an slf4j adapter. It can be very helpful. At lease until a proper specific backend will be implemented. |
The issue is that if there SLF4J API was not written to expect to be called from another logging API we might never be able to address things like the line number issue when using it. My gut feeling is that JDK and Log4J2 between them will be the vast majority of cases. I'm much less inclined to spend time on Log4J (v1) and SLF4J when it comes to features and bugs (diminishing returns) but I'd always be grateful for fixes if other people want to make them. |
Hi @MosheElisha , Did you get any solution or workaround of this issue? I have raised similar issue here: #360 |
Hi,
Thank you for adding log4j2 support.
When trying to use v 0.5 with the attached line-number-test.zip I see the following output:
example.LogTest
instead ofexample.LogTest:INFO in 18b4aac2
%line
. I noticed there is an internal Option.WITH_LOG_SITE but couldn't find a way to influence that and I would expect that having%line
would be sufficient.The text was updated successfully, but these errors were encountered: