Author: floriansemm
Date: Mon Mar 26 06:20:19 2012
New Revision: 1305233
URL: http://svn.apache.org/viewvc?rev=1305233&view=rev
Log:
create documentation
Added:
logging/log4php/trunk/src/site/xdoc/docs/appenders/firephp.xml (with
props)
Modified:
logging/log4php/trunk/src/changes/changes.xml
logging/log4php/trunk/src/main/php/appenders/LoggerAppenderFirephp.php
logging/log4php/trunk/src/site/site.xml
Modified: logging/log4php/trunk/src/changes/changes.xml
URL:
http://svn.apache.org/viewvc/logging/log4php/trunk/src/changes/changes.xml?rev=1305233&r1=1305232&r2=1305233&view=diff
==============================================================================
--- logging/log4php/trunk/src/changes/changes.xml (original)
+++ logging/log4php/trunk/src/changes/changes.xml Mon Mar 26 06:20:19 2012
@@ -25,6 +25,7 @@
<action date="2011-02-28" type="fix"
issue="LOG4PHP-163" dev="Ivan Habunek">Fixed formatting bug in
LoggerLayoutPattern.</action>
<action date="2011-02-28" type="update"
issue="LOG4PHP-172" dev="Ivan Habunek">Rewritten pattern system to allow longer
conversion words and some new ones.</action>
<action date="2011-02-28" type="add"
issue="LOG4PHP-134" dev="Ivan Habunek">Added reconnectAttempts parameter to
LoggerAppenderPDO. Adds support for reconnect if connection fails while
appending.</action>
+ <action date="2011-03-26" type="add"
issue="LOG4PHP-174" dev="Florian Semm">Firephp appender logs to Firebug
console.</action>
</release>
<release version="2.2.1" date="2012-02-18">
<action date="2011-02-07" type="fix" issue="LOG4PHP-168"
dev="Ivan Habunek">Fixed a bug which prevented configuration by passing a
LoggerConfigurator instance.</action>
Modified: logging/log4php/trunk/src/main/php/appenders/LoggerAppenderFirephp.php
URL:
http://svn.apache.org/viewvc/logging/log4php/trunk/src/main/php/appenders/LoggerAppenderFirephp.php?rev=1305233&r1=1305232&r2=1305233&view=diff
==============================================================================
--- logging/log4php/trunk/src/main/php/appenders/LoggerAppenderFirephp.php
(original)
+++ logging/log4php/trunk/src/main/php/appenders/LoggerAppenderFirephp.php Mon
Mar 26 06:20:19 2012
@@ -34,31 +34,37 @@
/**
* Connect Apache Log4php to Insight, the next version of FirePHP
* Read the link at sourcemint, to <b>define</b> 4 INSIGHT_* constants in your
php
- * config / bootstrap
+ *
+ * LoggerAppenderFirephp logs events by creating a PHP user-level message
using the Browser-Extension FirePHP
+ *
+ * An example php file:
+ *
+ * {@example ../../examples/php/appender_firephp.php 19}
*
- * @category Include
+ * An example configuration file:
+ *
+ * {@example ../../examples/resources/appender_firephp.xml 18}
+ *
* @package LoggerAppenderFirephp
* @author Bruce Ingalls <Bruce.Ingalls-at-gmail-dot-com>
* @copyright 2012 Apache Software Foundation
* @license Apache License, Version 2.0
* @link
http://sourcemint.com/github.com/firephp/firephp/1:1.0.0b1rc6/-docs/Configuration/Constants
- * @example define('INSIGHT_IPS', '*'); //If using firephp lib
- * @example define('INSIGHT_AUTHKEYS', '*'); //weak security (ok for dev
only)
- * @example define('INSIGHT_PATHS', dirname(__FILE__));
- * @example define('INSIGHT_SERVER_PATH', '/index.php');
*/
class LoggerAppenderFirephp extends LoggerAppender {
+
+ /**
+ *
+ * @var FirePHP instance of FirePHP-Console Client
+ */
protected $console;
- protected $medium;
-
+
/**
- * Default constructor
- *
- * @param string $name Default ''
+ *
+ * where to write the log-message
+ * @var string possible values are: page, request, package, contoller,
site, page
*/
- public function __construct($name = '') {
- parent::__construct($name);
- }
+ protected $medium;
/**
* Enable
@@ -106,11 +112,6 @@ class LoggerAppenderFirephp extends Logg
return strtolower($event->getLevel()->toString());
}
- /**
- * Disable
- *
- * @return void
- */
public function close() {
$this->closed = true;
}
@@ -151,11 +152,8 @@ class LoggerAppenderFirephp extends Logg
* Sets medium. Defaults to 'page' for firebug console
*
* @param string $medium
- *
- * @return void
*/
- public function setMedium($medium='page') {
+ public function setMedium($medium = 'page') {
$this->setString('medium', $medium);
}
-
-}
+}
\ No newline at end of file
Modified: logging/log4php/trunk/src/site/site.xml
URL:
http://svn.apache.org/viewvc/logging/log4php/trunk/src/site/site.xml?rev=1305233&r1=1305232&r2=1305233&view=diff
==============================================================================
--- logging/log4php/trunk/src/site/site.xml (original)
+++ logging/log4php/trunk/src/site/site.xml Mon Mar 26 06:20:19 2012
@@ -57,6 +57,7 @@
<item name="LoggerAppenderRollingFile"
href="/docs/appenders/rolling-file.html" />
<item name="LoggerAppenderSocket"
href="/docs/appenders/socket.html" />
<item name="LoggerAppenderSyslog"
href="/docs/appenders/syslog.html" />
+ <item name="LoggerAppenderFirephp"
href="/docs/appenders/firephp.html" />
</item>
<item name="Layouts" href="/docs/layouts.html"
collapse="true">
<item name="LoggerLayoutHtml"
href="/docs/layouts/html.html" />
Added: logging/log4php/trunk/src/site/xdoc/docs/appenders/firephp.xml
URL:
http://svn.apache.org/viewvc/logging/log4php/trunk/src/site/xdoc/docs/appenders/firephp.xml?rev=1305233&view=auto
==============================================================================
--- logging/log4php/trunk/src/site/xdoc/docs/appenders/firephp.xml (added)
+++ logging/log4php/trunk/src/site/xdoc/docs/appenders/firephp.xml Mon Mar 26
06:20:19 2012
@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<document xmlns="http://maven.apache.org/XDOC/2.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/XDOC/2.0
http://maven.apache.org/xsd/xdoc-2.0.xsd">
+
+ <properties>
+ <title>LoggerAppenderFirephp</title>
+ </properties>
+
+ <body>
+ <section name="LoggerAppenderFirephp">
+
+ <p><code>LoggerAppenderFirephp</code> logs events by
creating a PHP user-level message using the Browser-Extension
+ <code><a href="http://www.firephp.org/" target="_blank"
+ class="externalLink">FirePHP</a></code></p>
+
+ <subsection name="Layout">
+ <p>This appender requires a layout. If no
layout is specified in configuration,
+ <code><a
href="../layouts/simple.html">LoggerLayoutSimple</a></code> will be used by
default.</p>
+ </subsection>
+
+ <subsection name="Parameters">
+ <p>This appender has no configurable
parameters.</p>
+ </subsection>
+
+ <subsection name="Examples">
+
+ <div class="auto-tabs">
+ <ul>
+ <li>XML</li>
+ <li>PHP</li>
+ </ul>
+
+ <div class="tab-content" >
+ <div class="tab-pane">
+<pre class="prettyprint"><![CDATA[
+<configuration xmlns="http://logging.apache.org/log4php/">
+ <appender name="default" class="LoggerAppenderFirephp">
+ <layout class="LoggerLayoutSimple" />
+ </appender>
+ <root>
+ <appender_ref ref="default" />
+ </root>
+</configuration>
+]]></pre>
+ </div>
+ <div class="tab-pane">
+<pre class="prettyprint"><![CDATA[
+array(
+ 'appenders' => array(
+ 'default' => array(
+ 'class' => 'LoggerAppenderFirephp',
+ 'layout' => array(
+ 'class' => 'LoggerLayoutSimple',
+ ),
+ ),
+ ),
+ 'rootLogger' => array(
+ 'appenders' => array('default'),
+ ),
+);
+]]></pre>
+ </div>
+ </div>
+ </div>
+ </subsection>
+ </section>
+ </body>
+</document>
Propchange: logging/log4php/trunk/src/site/xdoc/docs/appenders/firephp.xml
------------------------------------------------------------------------------
svn:mime-type = text/plain