logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ihabu...@apache.org
Subject svn commit: r1379738 - in /logging/log4php/trunk/src/main/php: LoggerHierarchy.php LoggerLocationInfo.php LoggerLoggingEvent.php
Date Sat, 01 Sep 2012 10:28:02 GMT
Author: ihabunek
Date: Sat Sep  1 10:28:02 2012
New Revision: 1379738

URL: http://svn.apache.org/viewvc?rev=1379738&view=rev
Log:
Removed unnecessary initialization of member variables to null. Improved phpdoc for LoggerLocationInfo.

Modified:
    logging/log4php/trunk/src/main/php/LoggerHierarchy.php
    logging/log4php/trunk/src/main/php/LoggerLocationInfo.php
    logging/log4php/trunk/src/main/php/LoggerLoggingEvent.php

Modified: logging/log4php/trunk/src/main/php/LoggerHierarchy.php
URL: http://svn.apache.org/viewvc/logging/log4php/trunk/src/main/php/LoggerHierarchy.php?rev=1379738&r1=1379737&r2=1379738&view=diff
==============================================================================
--- logging/log4php/trunk/src/main/php/LoggerHierarchy.php (original)
+++ logging/log4php/trunk/src/main/php/LoggerHierarchy.php Sat Sep  1 10:28:02 2012
@@ -56,7 +56,7 @@ class LoggerHierarchy {
 	 * The root logger.
 	 * @var RootLogger 
 	 */
-	protected $root = null;
+	protected $root;
 	
 	/** 
 	 * The logger renderer map.

Modified: logging/log4php/trunk/src/main/php/LoggerLocationInfo.php
URL: http://svn.apache.org/viewvc/logging/log4php/trunk/src/main/php/LoggerLocationInfo.php?rev=1379738&r1=1379737&r2=1379738&view=diff
==============================================================================
--- logging/log4php/trunk/src/main/php/LoggerLocationInfo.php (original)
+++ logging/log4php/trunk/src/main/php/LoggerLocationInfo.php Sat Sep  1 10:28:02 2012
@@ -26,37 +26,39 @@
  * @since 0.3
  */
 class LoggerLocationInfo {
-	/**
-	 * When location information is not available the constant
-	 * <i>NA</i> is returned. Current value of this string
-	 * constant is <b>?</b>.  
-	 */
+	
+	/** The value to return when the location information is not available. */
 	const LOCATION_INFO_NA = 'NA';
 	
 	/**
-	* @var string Caller's line number.
-	*/
-	protected $lineNumber = null;
+	 * Caller line number.
+	 * @var integer 
+	 */
+	protected $lineNumber;
 	
 	/**
-	* @var string Caller's file name.
-	*/
-	protected $fileName = null;
+	 * Caller file name.
+	 * @var string 
+	 */
+	protected $fileName;
 	
 	/**
-	* @var string Caller's fully qualified class name.
-	*/
-	protected $className = null;
+	 * Caller class name.
+	 * @var string 
+	 */
+	protected $className;
 	
 	/**
-	* @var string Caller's method name.
-	*/
-	protected $methodName = null;
+	 * Caller method name.
+	 * @var string 
+	 */
+	protected $methodName;
 	
 	/**
-	* @var string 
-	*/
-	protected $fullInfo = null;
+	 * All the information combined.
+	 * @var string 
+	 */
+	protected $fullInfo;
 
 	/**
 	 * Instantiate location information based on a {@link PHP_MANUAL#debug_backtrace}.
@@ -73,36 +75,27 @@ class LoggerLocationInfo {
 			'(' . $this->getFileName() . ':' . $this->getLineNumber() . ')';
 	}
 
+	/** Returns the caller class name. */
 	public function getClassName() {
 		return ($this->className === null) ? self::LOCATION_INFO_NA : $this->className; 
 	}
 
-	/**
-	 *	Return the file name of the caller.
-	 *	<p>This information is not always available.
-	 */
+	/** Returns the caller file name. */
 	public function getFileName() {
 		return ($this->fileName === null) ? self::LOCATION_INFO_NA : $this->fileName; 
 	}
 
-	/**
-	 *	Returns the line number of the caller.
-	 *	<p>This information is not always available.
-	 */
+	/** Returns the caller line number. */
 	public function getLineNumber() {
 		return ($this->lineNumber === null) ? self::LOCATION_INFO_NA : $this->lineNumber;

 	}
 
-	/**
-	 *	Returns the method name of the caller.
-	 */
+	/** Returns the caller method name. */
 	public function getMethodName() {
 		return ($this->methodName === null) ? self::LOCATION_INFO_NA : $this->methodName;

 	}
 
-	/**
-	 *	Returns the full information of the caller.
-	 */
+	/** Returns the full information of the caller. */
 	public function getFullInfo() {
 		return ($this->fullInfo === null) ? self::LOCATION_INFO_NA : $this->fullInfo;
 	}

Modified: logging/log4php/trunk/src/main/php/LoggerLoggingEvent.php
URL: http://svn.apache.org/viewvc/logging/log4php/trunk/src/main/php/LoggerLoggingEvent.php?rev=1379738&r1=1379737&r2=1379738&view=diff
==============================================================================
--- logging/log4php/trunk/src/main/php/LoggerLoggingEvent.php (original)
+++ logging/log4php/trunk/src/main/php/LoggerLoggingEvent.php Sat Sep  1 10:28:02 2012
@@ -36,7 +36,7 @@ class LoggerLoggingEvent {
 	/**
 	* @var Logger reference
 	*/
-	private $logger = null;
+	private $logger;
 	
 	/** 
 	 * The category (logger) name.
@@ -78,14 +78,14 @@ class LoggerLoggingEvent {
 	 * objet rendering mechanism. At present renderedMessage == message.
 	 * @var string
 	 */
-	private $renderedMessage = null;
+	private $renderedMessage;
 	
 	/** 
 	 * The name of thread in which this logging event was generated.
 	 * log4php saves here the process id via {@link PHP_MANUAL#getmypid getmypid()} 
 	 * @var mixed
 	 */
-	private $threadName = null;
+	private $threadName;
 	
 	/** 
 	* The number of seconds elapsed from 1/1/1970 until logging event
@@ -97,12 +97,12 @@ class LoggerLoggingEvent {
 	/** 
 	* @var LoggerLocationInfo Location information for the caller. 
 	*/
-	private $locationInfo = null;
+	private $locationInfo;
 	
 	/**
 	 * @var LoggerThrowableInformation log4php internal representation of throwable
 	 */
-	private $throwableInfo = null;
+	private $throwableInfo;
 	
 	/**
 	* Instantiate a LoggingEvent from the supplied parameters.



Mime
View raw message