n2n Page Rocket 1 API

n2n\log4php\logging

­Logging­Event

LoggingEvent
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.

Property summary

Modifier and Type Property
protected LoggerLevel level
public float timeStamp

Methods summary

Modifier and Type Method
public __construct ( string fqcn , mixed logger , LoggerLevel level , mixed message , integer timeStamp = null , Exception throwable = null )
public getFullQualifiedClassname ( )
public LocationInfo getLocationInformation ( )
public LoggerLevel getLevel ( )
public Logger getLogger ( )
public string getLoggerName ( )
public mixed getMessage ( )
public string getNDC ( )
public string getMDC ( unknown key )
public array getMDCMap ( )
public string getRenderedMessage ( )
public static float getStartTime ( )
public float getTimeStamp ( )
public float getRelativeTime ( )
public integer getTime ( )
public mixed getThreadName ( )
public mixed getThrowableInformation ( )
public string toString ( )
public __sleep ( )

Properties in detail

  • level

    protected ­ ­ LoggerLevel ­ level
    Level of the logging event.
    var
    LoggerLevel
  • timeStamp

    public ­ ­ float ­ timeStamp
    The number of seconds elapsed from 1/1/1970 until logging event was created plus microseconds if available.
    var
    float

Methods in detail

  • __construct

    public __construct ( string fqcn , mixed logger , LoggerLevel level , mixed message , integer timeStamp = null , Exception throwable = null )
    Instantiate a LoggingEvent from the supplied parameters. Except $timeStamp all the other fields of LoggingEvent are filled when actually needed.
    param
    string fqcn name of the caller class.
    mixed logger The Logger category of this event or the logger name.
    LoggerLevel 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

    public getFullQualifiedClassname ( )
    Returns the full qualified classname. TODO: PHP does contain namespaces in 5.3. Those should be returned too,
  • getLocationInformation

    LocationInfo public getLocationInformation ( )

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

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

    It only recognize informations generated by Logger and its subclasses.

  • getLevel

    LoggerLevel public getLevel ( )
    Return the level of this event. Use this form instead of directly accessing the $level field.
  • getLogger

    Logger public getLogger ( )
    Returns the logger which created the event.
    return
  • getLoggerName

    string public getLoggerName ( )
    Return the name of the logger. Use this form instead of directly accessing the $categoryName field.
    return
    string
  • getMessage

    mixed public getMessage ( )
    Return the message for this logging event.
    return
    mixed
  • getNDC

    string public getNDC ( )
    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.
    return
    string
  • getMDC

    string public getMDC ( unknown key )
    Returns the the context corresponding to the key parameter.
    return
    string
  • getMDCMap

    array public getMDCMap ( )
    Returns the entire MDC context.
    return
    array
  • getRenderedMessage

    string public getRenderedMessage ( )
    Render message.
    return
    string
  • getStartTime

    float public static getStartTime ( )
    Returns the time when the application started, as a UNIX timestamp with microseconds.
    return
    float
  • getTimeStamp

    float public getTimeStamp ( )
    return
    float
  • getRelativeTime

    float public getRelativeTime ( )
    Returns the time in seconds passed from the beginning of execution to the time the event was constructed.
    return
    float
  • getTime

    integer public getTime ( )
    Returns the time in milliseconds passed from the beginning of execution to the time the event was constructed.
    deprecated
    deprecated
    return
    integer
  • getThreadName

    mixed public getThreadName ( )
    return
    mixed
  • getThrowableInformation

    mixed public getThrowableInformation ( )
    return
    mixed
  • toString

    string public toString ( )
    Serialize this object
    return
    string
  • __sleep

    public __sleep ( )
    Avoid serialization of the $logger object