Hi, On Mon, 2 Jan 2023 at 10:08, Volkan Yazıcı <vol...@yazi.ci> wrote: > Agreed with the separate repository idea. I suggest moving it to the > `logging-log4j-maven-plugins` repository – you need an INFRA ticket to > create the repository.
The Maven plugin will not be the only use-case of the code after I finish up the project. Since I am really bad at naming things, so maybe I'll describe the feature-set and someone will come with the ideal name. :-D I imagine one module that will weave bytecode (`log4j-instrument`) to: * convert classical Log4j2 API calls to LogBuilder calls with location, * convert other API calls (Log4j 1.2, JCL, SLF4J and especially `java.util.logging`) to Log4j2 API calls (LogBuilder with location for now), * implement `java.lang.instrument.ClassFileTransformer` so that we can use it to weave at runtime. A second module would be based on a refactoring library (Error Prone? called `log4j-errorprone`?) to: * convert classical Log4j2 API calls to LogBuilder (this simplifies weaving a lot), * convert other API calls to Log4j2 API, * check for common mistakes of new Log4j2 API adopters: e.g. `if (logger.isDebugEnabled() logger.debug(...);` or `logger.debug("Hello name " + name + ".")`. A Maven module would use `log4j-instrument` to: * weave a project's classes, * weave all JAR dependencies (well, with some default exclusion patterns such as `log4j-*.jar` of course), * create a POM that only references Log4j2 API. And of course Maven is not the only build tool on the market. Contributors could submit plugins for other build tools. I think that `logging-log4j-tools` would be a nice name for a repository, but it is taken. :-) Unless `log4j-changelog` is targeted at a larger audience, in which case we can share. :-) Piotr