Class LoggerLoggingEvent

Description

The internal representation of logging event.

  • version: $Revision: 1222216 $

Located in /LoggerLoggingEvent.php (line 27)


	
			
Variable Summary
Method Summary
static float getStartTime ()
LoggerLoggingEvent __construct (string $fqcn, mixed $logger, LoggerLevel $priority, mixed $message, [integer $timeStamp = null], [ $throwable = null])
string getLoggerName ()
string getMDC ( $key)
array getMDCMap ()
mixed getMessage ()
string getNDC ()
string getRenderedMessage ()
mixed getThreadName ()
the getTime ()
float getTimeStamp ()
string toString ()
void __sleep ()
Variables
static mixed $startTime (line 29)
  • access: private
mixed $categoryName (line 48)

The category (logger) name.

This field will be marked as private in future releases. Please do not access it directly. Use the getLoggerName() method instead.

  • deprecated:
  • access: private
string $fqcn (line 34)
  • var: Fully Qualified Class Name of the calling category class.
  • access: private
LoggerLevel $level (line 54)

Level of the logging event.

  • access: protected
LoggerLocationInfo $locationInfo = null (line 108)
  • var: Location information for the caller.
  • access: private
Logger $logger = null (line 39)
  • var: reference
  • access: private
boolean $mdcCopyLookupRequired = true (line 77)

Have we tried to do an MDC lookup? If we did, there is no need to do it again. Note that its value is always false when serialized. See also the getMDC and getMDCCopy methods.

  • access: private
mixed $message (line 82)
  • var: The application supplied message of logging event.
  • access: private
string $ndc (line 60)

The nested diagnostic context (NDC) of logging event.

  • access: private
boolean $ndcLookupRequired = true (line 69)

Have we tried to do an NDC lookup? If we did, there is no need to do it again. Note that its value is always false when serialized. Thus, a receiving SocketNode will never use it's own (incorrect) NDC. See also writeObject method.

  • access: private
string $renderedMessage = null (line 89)

The application supplied message rendered through the log4php objet rendering mechanism. At present renderedMessage == message.

  • access: private
mixed $threadName = null (line 96)

The name of thread in which this logging event was generated.

log4php saves here the process id via getmypid()

  • access: private
LoggerThrowableInformation $throwableInfo = null (line 113)
  • var: log4php internal representation of throwable
  • access: private
float $timeStamp (line 103)

The number of seconds elapsed from 1/1/1970 until logging event was created plus microseconds if available.

  • access: public
Methods
static getStartTime (line 293)

Returns the time when the application started, as a UNIX timestamp with microseconds.

  • access: public
static float getStartTime ()
Constructor __construct (line 128)

Instantiate a LoggingEvent from the supplied parameters.

Except $timeStamp all the other fields of LoggerLoggingEvent are filled when actually needed.

  • access: public
LoggerLoggingEvent __construct (string $fqcn, mixed $logger, LoggerLevel $priority, mixed $message, [integer $timeStamp = null], [ $throwable = null])
  • string $fqcn: name of the caller class.
  • mixed $logger: The Logger category of this event or the logger name.
  • LoggerLevel $priority: The level of this event.
  • mixed $message: The message of this event.
  • integer $timeStamp: the timestamp of this logging event.
  • Exception $throwable: The throwable associated with logging event
getFullQualifiedClassname (line 153)

Returns the full qualified classname.

TODO: PHP does contain namespaces in 5.3. Those should be returned too,

  • access: public
void getFullQualifiedClassname ()
getLevel (line 210)

Return the level of this event. Use this form instead of directly accessing the $level field.

  • access: public
LoggerLevel getLevel ()
getLocationInformation (line 166)

Set the location information for this logging event. The collected information is cached for future use.

This method uses debug_backtrace() function (if exists) to collect informations about caller.

It only recognize informations generated by Logger and its subclasses.

  • access: public
LoggerLocationInfo getLocationInformation ()
getLoggerName (line 219)

Return the name of the logger. Use this form instead of directly accessing the $categoryName field.

  • access: public
string getLoggerName ()
getMDC (line 260)

Returns the the context corresponding to the

parameter.

  • access: public
string getMDC ( $key)
  • $key
getMDCMap (line 268)

Returns the entire MDC context.

  • access: public
array getMDCMap ()
getMessage (line 232)

Return the message for this logging event.

Before serialization, the returned object is the message passed by the user to generate the logging event. After serialization, the returned value equals the String form of the message possibly after object rendering.

  • access: public
mixed getMessage ()
getNDC (line 247)

This method returns the NDC for this event. It will return the correct content even if the event was generated in a different thread or even on a different machine. The LoggerNDC::get() method should never be called directly.

  • access: public
string getNDC ()
getRenderedMessage (line 276)

Render message.

  • access: public
string getRenderedMessage ()
getThreadName (line 320)
  • access: public
mixed getThreadName ()
getThrowableInformation (line 330)
  • return: LoggerThrowableInformation
  • access: public
mixed getThrowableInformation ()
getTime (line 311)

Calculates the time of this event.

  • return: time after event starttime when this event has occured
  • access: public
the getTime ()
getTimeStamp (line 303)
  • access: public
float getTimeStamp ()
toString (line 338)

Serialize this object

  • access: public
string toString ()
__sleep (line 345)

Avoid serialization of the $logger object

  • access: public
void __sleep ()

Documentation generated on Sat, 18 Feb 2012 22:32:25 +0000 by phpDocumentor 1.4.3