From Gentoo Wiki
Apache Log4j is a Java-based logging utility. It consists of several modules the most important which of are already available as packages in Gentoo:
These packages do not yet have tests enabled because of still missing dependencies, e.g. bug #829070, bug #833456. Engaged hackers are welcome to make themselves familiar with the Gentoo Java Packing Policy and pullrequest their contributions.
The log4j-* packages like libraries in general are pulled-in by their reverse dependencies so that there is no need to emerge them directly and recording them in /var/lib/portage/world is a bad idea.
USE flags are the same as for most java packages.
USE flags for dev-java/log4j-api The Apache Log4j API
||Add extra documentation (API, Javadoc, etc). It is recommended to enable per package instead of globally|
||Zip the sources and install them|
||Enable dependencies and/or preparations necessary to run tests (usually controlled by FEATURES=test but can be toggled independently)|
||Verify upstream signatures on distfiles|
USE flags for dev-java/log4j-core The Apache Log4j Implementation