Home >Backend Development >PHP Tutorial >log4php installation

log4php installation

WBOY
WBOYOriginal
2016-08-08 09:19:371084browse

  1. Download and install

See: http://logging.apache.org/log4php/install.html

Install from the source code. After unzipping the tar package, you will get the apache-log4php directory. Its structure is as follows:

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

Copy src/main/php to the php library of the web server
For example,

cp src/main/php/ /home/admin/apache/apache_install/lib/php/log4php

  1. Use

php require_once

<code><span><span><?php</span><span>require_once</span>(<span>'log4php/Logger.php'</span>);

<span>?></span></span></code>

quick start
http://logging.apache.org/log4php/quickstart.html

Copyright Statement: This article is an original article by the blogger and may not be reproduced without the blogger's permission.

The above introduces the log4php installation, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn