From source package

Download the latest source package from the download page and unpack it.

The package directory structure is as follows:

├───apidocs      - API generated documentation
    ├───assembly - Maven assembly configuration 
    ├───changes  - The change log
    ├───examples - Various usage examples
    │   └───php  - The main source code
    ├───site     - Web site source
    └───test     - Unit tests

Most users will primarily be interested in the source code which is located in /src/main/php. The contents of this directory may be copied to a directory within your project for easier access.

From PEAR repository

Apache log4php has it's own PEAR channel.

To install from the PEAR channel, execute the following commands:

pear channel-discover
pear install log4php/Apache_log4php