You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4php-dev@logging.apache.org by ma...@apache.org on 2004/03/08 22:07:17 UTC
cvs commit: logging-log4php .cvsignore build.properties.dist build.xml INSTALL NOTICE phpdoc.ini README
marco 2004/03/08 13:07:17
Added: . .cvsignore build.properties.dist build.xml INSTALL
NOTICE phpdoc.ini README
Log:
Initial Import
Revision Changes Path
1.1 logging-log4php/.cvsignore
Index: .cvsignore
===================================================================
build
dist
build.properties
1.1 logging-log4php/build.properties.dist
Index: build.properties.dist
===================================================================
phpdoc.exe=/your/phpdoc/exec/file
1.1 logging-log4php/build.xml
Index: build.xml
===================================================================
<!--
Log4php ANT build script.
$Revision: 1.1 $
-->
<project name="Log4php" default="usage" basedir=".">
<!-- Give user a chance to override without editing this file or typing -D -->
<property environment="env"/>
<property file="${user.home}/.ant.properties"/>
<property file="build.properties"/>
<!-- Read the system environment variables and stores them in properties, -->
<!-- prefixed with "env". -->
<property name="logging-site" value="../logging-site"/>
<!-- set global properties for this build -->
<property name="src.dir" value="src" />
<property name="doc.dir" value="docs" />
<property name="build.dir" value="build" />
<property name="build.src.dir" value="${build.dir}/src" />
<!-- <property name="build.test.dir" value="${build.src.dir}/tests" /> -->
<property name="build.doc.dir" value="${build.dir}/docs" />
<property name="build.api.dir" value="${build.dir}/docs/api" />
<property name="dist.dir" value="dist"/>
<property name="dist.images" value="dist/images"/>
<property name="dist.tmp" value="dist/tmp"/>
<!-- Construct classpath for building the html pages -->
<path id="site.classpath">
<fileset dir="${logging-site}/lib">
<include name="*.jar"/>
</fileset>
</path>
<patternset id="source.files">
<!-- include everything we want in the src directory
that we didn't want in the dist itself -->
<include name="**/*.php"/>
<!--
<include name="**/*.xml"/>
<include name="**/*.htm*"/>
<include name="**/*.dtd"/>
-->
<exclude name="**/*CVS*"/>
</patternset>
<patternset id="html.files">
<!-- include everything we want in the html directory
that we didn't want in the dist itself -->
<include name="**/*.htm*"/>
<include name="**/*.gif"/>
<include name="**/*.png"/>
<include name="**/*.jpg"/>
<include name="**/*.jpeg"/>
<include name="**/*.txt"/>
<include name="**/*.css"/>
<include name="**/*.js"/>
<exclude name="**/*CVS*"/>
</patternset>
<patternset id="xml.files">
<!-- include everything we want in the html directory
that we didn't want in the dist itself -->
<include name="**/*.xml"/>
<include name="**/*.dtd"/>
<include name="**/*.xsd"/>
<include name="**/*.xsl"/>
<exclude name="**/*CVS*"/>
</patternset>
<patternset id="php.files">
<include name="**/*.php"/>
<include name="**/*.php3"/>
<include name="**/*.phps"/>
</patternset>
<patternset id="doc.files">
<include name="**/*.doc"/>
<include name="**/*.txt"/>
<include name="**/*.pdf"/>
<patternset refid="html.files" />
</patternset>
<patternset id="base.doc.files">
<include name="README"/>
<include name="INSTALL"/>
<include name="LICENSE"/>
<include name="ChangeLog"/>
</patternset>
<patternset id="test.files">
<!-- include everything we want in the src directory
that we didn't want in the dist itself -->
<include name="**/*.php"/>
<include name="**/*.xml"/>
<include name="**/*.htm*"/>
<include name="**/*.properties"/>
<exclude name="**/*CVS*"/>
</patternset>
<patternset id="contribs.files">
<!-- include everything we want in the src directory
that we didn't want in the dist itself -->
<include name="**/*"/>
<exclude name="**/*CVS*"/>
</patternset>
<!-- Tasks -->
<target name="clean" description="Cleans up build and dist directories">
<delete dir="${build.dir}"/>
<delete dir="${dist.dir}"/>
</target>
<target name="usage">
<echo>
These are the targets supported by this ANT build scpript:
build - compile all project files.
phpdoc - build project phpdoc files
doc - build project doc and phpdoc files
dist - will create a complete distribution in dist/
Setting the env variable NO_PHPDOC will build the distribution
without running the phpdoc target.
site - will create the www site
</echo>
</target>
<!-- ================================================================= -->
<!-- Initialize variables -->
<!-- NOTE: all directories are relative to log4php/ -->
<!-- ================================================================= -->
<target name="init">
<echo>Basedir is ${basedir}</echo>
<tstamp />
</target>
<target name="build" depends="init" >
<mkdir dir="${build.src.dir}/${name}"/>
<copy todir="${build.src.dir}/${name}">
<fileset dir="${src.dir}/${name}">
<patternset refid="source.files"/>
</fileset>
</copy>
<mkdir dir="${build.src.dir}/tests"/>
<copy todir="${build.src.dir}/tests">
<fileset dir="${src.dir}/tests">
<patternset refid="test.files"/>
</fileset>
</copy>
<mkdir dir="${build.dir}/contribs"/>
<copy todir="${build.dir}/contribs">
<fileset dir="${basedir}/contribs">
<patternset refid="contribs.files"/>
</fileset>
</copy>
</target>
<target name="phpdoc" depends="build" unless="env.NO_PHPDOC" description="Compile the phpDocumentor API documentation to dist dir">
<mkdir dir="${build.api.dir}"/>
<!-- Copy and replace phpdoc.ini -->
<copy file="${basedir}/phpdoc.ini" todir="${build.api.dir}"/>
<replace file="${build.api.dir}/phpdoc.ini" token="@Name@" value="${Name}" />
<replace file="${build.api.dir}/phpdoc.ini" token="@package@" value="${name}" />
<replace file="${build.api.dir}/phpdoc.ini" token="@basedir@" value="${basedir}" />
<replace file="${build.api.dir}/phpdoc.ini" token="@src.dir@" value="${basedir}/${build.src.dir}" />
<replace file="${build.api.dir}/phpdoc.ini" token="@target@" value="${basedir}/${build.api.dir}" />
<!-- Add html package info in source -->
<copy todir="${build.src.dir}">
<fileset dir="${src.dir}">
<patternset refid="html.files"/>
</fileset>
</copy>
<replace dir="${build.src.dir}" token="@release@" value="${release}" />
<!-- Copy README,INSTALL,CHANGELOG -->
<copy todir="${build.src.dir}">
<fileset dir="${basedir}">
<patternset refid="base.doc.files"/>
</fileset>
</copy>
<!-- exec phpdoc -->
<exec executable="${phpdoc.exe}">
<arg line="--useconfig ./${build.api.dir}/phpdoc.ini" />
</exec>
<delete>
<fileset dir="${build.src.dir}">
<patternset refid="base.doc.files"/>
</fileset>
</delete>
<!-- Delete html package infos in source -->
<delete>
<fileset dir="${build.src.dir}">
<patternset refid="html.files"/>
</fileset>
</delete>
</target>
<target name="doc" depends="phpdoc, site">
<mkdir dir="${build.doc.dir}"/>
<copy todir="${build.doc.dir}">
<fileset dir="${doc.dir}">
<patternset refid="doc.files"/>
<patternset refid="base.doc.files"/>
</fileset>
</copy>
<replace dir="${build.doc.dir}" token="@release@" value="${release}" />
<copy file="${src.dir}/log4php/xml/log4php.dtd" todir="${build.doc.dir}"/>
</target>
<!-- ================================================================= -->
<!-- Build a complete distribution. Results go to ${dist.images} -->
<!-- ================================================================= -->
<target name="dist" depends="build, doc, site">
<delete dir="${dist.dir}"/>
<delete verbose="yes">
<fileset dir="${build.dir}">
<patternset>
<include name="**/*.bak"/>
</patternset>
</fileset>
<fileset dir="${build.doc.dir}/api">
<patternset>
<include name="errors.html"/>
<include name="phpdoc.ini"/>
</patternset>
</fileset>
</delete>
<mkdir dir="${dist.images}" />
<mkdir dir="${dist.tmp}/${name}-${release}" />
<copy todir="${dist.tmp}/${name}-${release}">
<fileset dir="${build.dir}" includes="src/**, contribs/**, docs/**" />
</copy>
<copy verbose="yes" todir="${dist.tmp}/${name}-${release}">
<fileset dir="${build.dir}/docs">
<patternset refid="base.doc.files"/>
</fileset>
</copy>
<touch datetime="${release-datetime}">
<fileset dir="${dist.tmp}/${name}-${release}"/>
</touch>
<tar tarfile="${dist.images}/${name}-${release}.tar.gz"
basedir="${dist.tmp}"
includes="${name}-${release}/**"
longfile="gnu"
compression="gzip"
/>
<zip zipfile="${dist.images}/${name}-${release}.zip"
basedir="${dist.tmp}"
includes="${name}-${release}/**" />
</target>
<!-- ============================ -->
<!-- ======= New targets ======== -->
<!-- ============================ -->
<target name="prepareSite">
<available classname="org.apache.velocity.anakia.AnakiaTask"
property="AnakiaTask.present">
<classpath refid="site.classpath"/>
</available>
</target>
<target name="checkSite" depends="prepareSite" unless="AnakiaTask.present">
<echo>
AnakiaTask is not present in ${logging-site}/lib! Please check to make sure that
velocity.jar is in your classpath.
</echo>
</target>
<target name="site" depends="checkSite" if="AnakiaTask.present">
<taskdef name="anakia" classname="org.apache.velocity.anakia.AnakiaTask">
<classpath refid="site.classpath"/>
</taskdef>
<mkdir dir="${build.doc.dir}/css"/>
<copy file="${logging-site}/docs/css/site.css" tofile="${build.doc.dir}/css/site.css"/>
<anakia basedir="${src.dir}/xdocs" destdir="${build.doc.dir}/"
extension=".html"
style="site.vsl"
projectFile="stylesheets/project.xml"
excludes="**/stylesheets/**, empty.xml"
includes="**/*.xml"
lastModifiedCheck="true"
templatePath="${logging-site}/src/xdocs/stylesheets">
</anakia>
<mkdir dir="${build.doc.dir}/images"/>
<copy todir="${build.doc.dir}/images">
<fileset dir="${src.dir}/xdocs/images">
<patternset refid="html.files"/>
</fileset>
</copy>
</target>
</project>
1.1 logging-log4php/INSTALL
Index: INSTALL
===================================================================
------------------------------------------------------------------------------
INSTALLATION
------------------------------------------------------------------------------
1. Before starting installing this package check if the following external
programs are installed:
a. PHP (version 4.2.x or above).
For logging location infos (see src/log4php/spi/LoggerLocationInfo.php)
for details) a PHP version >= 4.3.0 must be installed
2. Extract the tarball to a dir (ex: {YOUR_PATH}).
If you want to include log4php under an include_path dir
consider step (a).
If you want to include log4php wherever You want consider
step (b).
a. Create a log4php dir under an include_path.
Copy '{YOUR_PATH}/src/log4php' under an '{an_include_path}/log4php'.
define LOG4PHP_DIR as follow (recommended):
define('LOG4PHP_DIR', 'log4php');
or use directly:
require_once('log4php/LoggerManager.php');
LOG4PHP_DIR will be set automatically to '{an_include_path}/log4php'
(with path expansion).
b. Copy '{YOUR_PATH}/src/log4php' to the dir where You want log4php will
reside (ex: {MY_LOG4PHP_PATH}).
Define the constant 'LOG4PHP_DIR' to '{MY_LOG4PHP_PATH}' and use
require_once( LOG4PHP_DIR . '/LoggerManager.php' );
or directly:
require_once( '{MY_LOG4PHP_PATH}/LoggerManager.php' );
and LOG4PHP_DIR will be set automatically with
'{MY_LOG4PHP_PATH}' (with path expansion).
3. That's all!
------------------------------------------------------------------------------
$Revision: 1.1 $
------------------------------------------------------------------------------
1.1 logging-log4php/NOTICE
Index: NOTICE
===================================================================
**
** NOTICE file corresponding to the section 4 (d) of the Apache License,
** Version 2.0, in this case for the Apache log4net distribution.
**
This product includes software developed by
The Apache Software Foundation (http://www.apache.org/).
Please read the LICENSE files present in the root directory of this
distribution.
The names "log4php" and "Apache Software Foundation" must not be used to
endorse or promote products derived from this software without prior
written permission. For written permission, please contact
apache@apache.org.
1.1 logging-log4php/phpdoc.ini
Index: phpdoc.ini
===================================================================
;; phpDocumentor parse configuration file
;;
;; This file is designed to cut down on repetitive typing on the command-line or web interface
;; You can copy this file to create a number of configuration files that can be used with the
;; command-line switch -c, as in phpdoc -c default.ini or phpdoc -c myini.ini. The web
;; interface will automatically generate a list of .ini files that can be used.
;;
;; default.ini is used to generate the online manual at http://www.phpdoc.org/docs
;;
;; ALL .ini files must be in the user subdirectory of phpDocumentor with an extension of .ini
;;
;; Copyright 2002, Greg Beaver <ce...@users.sourceforge.net>
;;
;; WARNING: do not change the name of any command-line parameters, phpDocumentor will ignore them
[Parse Data]
;; title of all the documentation
;; legal values: any string
title = log4php
;; parse files that start with a . like .bash_profile
;; legal values: true, false
hidden = false
;; show elements marked @access private in documentation by setting this to on
;; legal values: on, off
parseprivate = off
;; parse with javadoc-like description (first sentence is always the short description)
;; legal values: on, off
javadocdesc = on
;; add any custom @tags separated by commas here
;; legal values: any legal tagname separated by commas.
customtags = log4j-class,log4j-author
;; This is only used by the XML:DocBook/peardoc2 converter
defaultcategoryname = Documentation
;; what is the main package?
;; legal values: alphanumeric string plus - and _
defaultpackagename = @package@
;; output any parsing information? set to on for cron jobs
;; legal values: on
quiet = on
;; parse a PEAR-style repository. Do not turn this on if your project does
;; not have a parent directory named "pear"
;; legal values: on/off
;pear = on
;; where should the documentation be written?
;; legal values: a legal path
target = @target@
;; limit output to the specified packages, even if others are parsed
;; legal values: package names separated by commas
;packageoutput = package1,package2
;; comma-separated list of files to parse
;; legal values: paths separated by commas
;filename = "@basedir@/README" , "@basedir@/INSTALL"
;; comma-separated list of directories to parse
;; legal values: directory paths separated by commas
;directory = /path1,/path2,.,..,subdirectory
;directory = /home/jeichorn/cvs/pear
directory = @src.dir@
;; template base directory (the equivalent directory of <installdir>/phpDocumentor)
;templatebase = /path/to/my/templates
;; comma-separated list of files, directories or wildcards ? and * (any wildcard) to ignore
;; legal values: any wildcard strings separated by commas
;ignore = /path/to/ignore*,*list.php,myfile.php,subdirectory/
;ignore = templates_c/,*HTML/default/*,spec/,*/CVS/*
;; comma-separated list of Converters to use in outputformat:Convertername:templatedirectory format
;; legal values: HTML:frames:default,HTML:frames:l0l33t,HTML:frames:phpdoc.de,HTML:frames:phphtmllib,
;; HTML:frames:earthli,
;; HTML:frames:DOM/default,HTML:frames:DOM/l0l33t,HTML:frames:DOM/phpdoc.de,
;; HTML:frames:DOM/phphtmllib,HTML:frames:DOM/earthli
;; HTML:Smarty:default,HTML:Smarty:PHP,HTML:Smarty:HandS
;; PDF:default:default,CHM:default:default,XML:DocBook/peardoc2:default
output=HTML:frames:default
;; turn this option on if you want highlighted source code for every file
;; legal values: on/off
sourcecode = off
1.1 logging-log4php/README
Index: README
===================================================================
===============================================================================
log4php
===============================================================================
Summary
Log4php is a php port of the most popular java logging framework log4j
(see http://logging.apache.org/log4j/docs for details).
Installation
See INSTALL file.
Documentation
. Main documentation in docs/
. API documentation in docs/api
. Log4j documentation at
http://logging.apache.org/log4j/docs/documentation.html
-------------------------------------------------------------------------------
$Revision: 1.1 $
-------------------------------------------------------------------------------