PhpLight
[ class tree: PhpLight ] [ index: PhpLight ] [ all elements ]

Class: PhpLight_Log_Object

Source Location: /Log/Object.php

Class Overview


Logging class


Variables

Constants

Methods



Class Details

[line 21]
Logging class



[ Top ]


Class Variables

$_logFile =

[line 48]

Log file



Tags:

access:  protected

Type:   string


[ Top ]

$_memMax =

[line 55]

Maximum memory used



Tags:

access:  protected

Type:   integer


[ Top ]

$_memMin =

[line 62]

Minimum memory used



Tags:

access:  protected

Type:   integer


[ Top ]

$_priorityNames = array(        
        PhpLight_Log::EMERG => 'EMERG',
        PhpLight_Log::ALERT => 'ALERT',
        PhpLight_Log::ERR => 'ERROR',
        PhpLight_Log::WARN => 'WARNING',
        PhpLight_Log::NOTICE => 'NOTICE',
        PhpLight_Log::INFO => 'INFO',
        PhpLight_Log::DEBUG => 'DEBUG'
    )

[line 33]

Priority names



Tags:

access:  protected

Type:   array


[ Top ]



Class Methods


constructor __construct [line 70]

void __construct( string $logFile)

Contructor



Tags:

access:  public


Parameters:

string   $logFile  

[ Top ]

method getElapsedTime [line 147]

float getElapsedTime( )

Returns the elapsed time from the logger initialization



Tags:

access:  public


[ Top ]

method getMemStats [line 86]

void getMemStats( integer &$min, integer &$max)

Return the references of min & max memory used in MB



Tags:

access:  public


Parameters:

integer   &$min   referenced variable to store the minimum value
integer   &$max   referenced variable to store the maximum value

[ Top ]

method log [line 102]

void log( string $message, integer $priority, [mixed $extras = null])

Log a message at a priority



Tags:

throws:  Exception
access:  public


Parameters:

string   $message   Message to log
integer   $priority   Priority of message
mixed   $extras   Extra information to log in event

[ Top ]

method _format [line 159]

string _format( array $event)

Formats data into a single line to be written by the writer.



Tags:

return:  formatted line to write to the log
access:  protected


Parameters:

array   $event   event data

[ Top ]

method _getMicrotime [line 206]

float _getMicrotime( )

Return the time in microseconds



Tags:

access:  protected


[ Top ]

method _write [line 192]

void _write( string $output)

Write output to log file



Tags:

access:  protected


Parameters:

string   $output  

[ Top ]


Class Constants

LOG_HEADER =  '%timestamp%|%pid%|%memory%|%file%|%line%|%priorityName%|'

[line 26]

Log header


[ Top ]



Documentation generated on Fri, 07 Oct 2011 08:06:19 +0300 by phpDocumentor 1.4.3