ppkarwasz opened a new pull request, #1147:
URL: https://github.com/apache/logging-log4j2/pull/1147

   This PR provides a simple Maven plugin with a `generate-location` goal, 
which process the compiled classes to add static location information.
   
   The code is split into two modules: `log4j-instrument`, which contains the 
bytecode manipulation features and `log4j-maven-plugin` with the Maven plugin 
itself. It's less than 10 classes in total, so maybe the split is overkill.
   
   Supported methods:
   * all `Logger` methods are supported (and tested) except `catching`, 
`printf`, `throwing`, `traceEntry` and `traceExit`, which don't have a 
corresponding `LogBuilder` method,
   * methods with a `(MessageSupplier)` and `(Supplier<?>)` signature are 
supported, but they are rewritten as `log(Supplier<Message>)` and `log(String, 
Supplier<?>...)` respectively due to the lack of corresponding `LogBuilder` 
methods. This introduces a small performance penalty and garbage, especially if 
the log statement is disabled.
   
   The Maven plugin works for me (you can test with the project in 
`log4j-maven-plugin/src/it/location`), but it requires more testing (and unit 
tests) to be ready for inclusion.
   
   All comments (naming conventions, implementation details) are welcome.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to