logging-log4php-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From grobme...@apache.org
Subject svn commit: r812001 - in /incubator/log4php/trunk/src: examples/php/mail.php examples/php/syslog.php examples/resources/mail.properties examples/resources/syslog.properties main/php/appenders/LoggerAppenderSyslog.php site/apt/docs/appenders.apt
Date Mon, 07 Sep 2009 05:42:45 GMT
Author: grobmeier
Date: Mon Sep  7 05:42:45 2009
New Revision: 812001

URL: http://svn.apache.org/viewvc?rev=812001&view=rev
Log:
Patch from Christian Hammers: phpdoc and APT docs make use of example files.

Modified:
    incubator/log4php/trunk/src/examples/php/mail.php
    incubator/log4php/trunk/src/examples/php/syslog.php
    incubator/log4php/trunk/src/examples/resources/mail.properties
    incubator/log4php/trunk/src/examples/resources/syslog.properties
    incubator/log4php/trunk/src/main/php/appenders/LoggerAppenderSyslog.php
    incubator/log4php/trunk/src/site/apt/docs/appenders.apt

Modified: incubator/log4php/trunk/src/examples/php/mail.php
URL: http://svn.apache.org/viewvc/incubator/log4php/trunk/src/examples/php/mail.php?rev=812001&r1=812000&r2=812001&view=diff
==============================================================================
--- incubator/log4php/trunk/src/examples/php/mail.php (original)
+++ incubator/log4php/trunk/src/examples/php/mail.php Mon Sep  7 05:42:45 2009
@@ -15,9 +15,11 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+// START SNIPPET: foo
 require_once dirname(__FILE__).'/../../main/php/Logger.php';
 
 Logger::configure(dirname(__FILE__).'/../resources/mail.properties');
 $logger = Logger::getRootLogger();
 $logger->fatal("Some critical message!");
+// END SNIPPET: foo
 ?>

Modified: incubator/log4php/trunk/src/examples/php/syslog.php
URL: http://svn.apache.org/viewvc/incubator/log4php/trunk/src/examples/php/syslog.php?rev=812001&r1=812000&r2=812001&view=diff
==============================================================================
--- incubator/log4php/trunk/src/examples/php/syslog.php (original)
+++ incubator/log4php/trunk/src/examples/php/syslog.php Mon Sep  7 05:42:45 2009
@@ -15,9 +15,12 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
+// START SNIPPET: foo
 require_once dirname(__FILE__).'/../../main/php/Logger.php';
 
 Logger::configure(dirname(__FILE__).'/../resources/syslog.properties');
 $logger = Logger::getRootLogger();
 $logger->fatal("Hello World!");
+// END SNIPPET: foo
 ?>

Modified: incubator/log4php/trunk/src/examples/resources/mail.properties
URL: http://svn.apache.org/viewvc/incubator/log4php/trunk/src/examples/resources/mail.properties?rev=812001&r1=812000&r2=812001&view=diff
==============================================================================
--- incubator/log4php/trunk/src/examples/resources/mail.properties (original)
+++ incubator/log4php/trunk/src/examples/resources/mail.properties Mon Sep  7 05:42:45 2009
@@ -15,9 +15,11 @@
 ; See the License for the specific language governing permissions and
 ; limitations under the License.
 ;
+; START SNIPPET: foo
 log4php.appender.email = LoggerAppenderMail
 log4php.appender.email.layout = LoggerLayoutTTCC
 log4php.appender.email.from = someone@example.com
 log4php.appender.email.to = log4php@example.com
 log4php.appender.email.subject = Log4php test
 log4php.rootLogger = FATAL, email
+; END SNIPPET: foo
\ No newline at end of file

Modified: incubator/log4php/trunk/src/examples/resources/syslog.properties
URL: http://svn.apache.org/viewvc/incubator/log4php/trunk/src/examples/resources/syslog.properties?rev=812001&r1=812000&r2=812001&view=diff
==============================================================================
--- incubator/log4php/trunk/src/examples/resources/syslog.properties (original)
+++ incubator/log4php/trunk/src/examples/resources/syslog.properties Mon Sep  7 05:42:45 2009
@@ -15,8 +15,10 @@
 ; See the License for the specific language governing permissions and
 ; limitations under the License.
 ;
+; START SNIPPET: foo
 log4php.appender.default = LoggerAppenderSyslog
 log4php.appender.default.layout = LoggerLayoutSimple
 log4php.appender.default.ident = log4php-test
 log4php.appender.default.facility = LOG_LOCAL0
 log4php.rootLogger = DEBUG, default
+; END SNIPPET: foo
\ No newline at end of file

Modified: incubator/log4php/trunk/src/main/php/appenders/LoggerAppenderSyslog.php
URL: http://svn.apache.org/viewvc/incubator/log4php/trunk/src/main/php/appenders/LoggerAppenderSyslog.php?rev=812001&r1=812000&r2=812001&view=diff
==============================================================================
--- incubator/log4php/trunk/src/main/php/appenders/LoggerAppenderSyslog.php (original)
+++ incubator/log4php/trunk/src/main/php/appenders/LoggerAppenderSyslog.php Mon Sep  7 05:42:45
2009
@@ -21,13 +21,15 @@
  * Log events using php {@link PHP_MANUAL#syslog} function.
  *
  * Levels are mapped as follows:
- * - <b>level &gt;= FATAL</b> to LOG_ALERT
- * - <b>FATAL &gt; level &gt;= ERROR</b> to LOG_ERR 
- * - <b>ERROR &gt; level &gt;= WARN</b> to LOG_WARNING
- * - <b>WARN  &gt; level &gt;= INFO</b> to LOG_INFO
- * - <b>INFO  &gt; level &gt;= DEBUG</b> to LOG_DEBUG
+ * - <b>level >= FATAL</b> to LOG_ALERT
+ * - <b>FATAL > level >= ERROR</b> to LOG_ERR 
+ * - <b>ERROR > level >= WARN</b> to LOG_WARNING
+ * - <b>WARN  > level >= INFO</b> to LOG_INFO
+ * - <b>INFO  > level >= DEBUG</b> to LOG_DEBUG
  *
  * @version $Revision$
+ * @example ../../examples/php/syslog.php   An example how to use the LoggerAppenderSyslog
class
+ * @example ../../examples/resources/syslog.properties   Configuration example
  * @package log4php
  * @subpackage appenders
  */ 

Modified: incubator/log4php/trunk/src/site/apt/docs/appenders.apt
URL: http://svn.apache.org/viewvc/incubator/log4php/trunk/src/site/apt/docs/appenders.apt?rev=812001&r1=812000&r2=812001&view=diff
==============================================================================
--- incubator/log4php/trunk/src/site/apt/docs/appenders.apt (original)
+++ incubator/log4php/trunk/src/site/apt/docs/appenders.apt Mon Sep  7 05:42:45 2009
@@ -236,6 +236,11 @@
  subject 			| Sets the subject of the mail
 *-------------------*-----------------------------------------------------*
 
+  Examples:
+  
+%{snippet|id=foo|file=src/examples/php/mail.php}
+  
+%{snippet|id=foo|file=src/examples/resources/mail.properties}
 
 ** LoggerAppenderMailEvent
  
@@ -335,4 +340,10 @@
   					| This value is used as a parameter for php openlog()
   					| and passed on to the syslog daemon.
 *-------------------*-----------------------------------------------------*
+
+  Examples: 
+ 
+%{snippet|id=foo|file=src/examples/php/syslog.php}
+
+%{snippet|id=foo|file=src/examples/resources/syslog.properties}
  



Mime
View raw message