Arbit - project tracking

Arbit - project tracking

API documentation :: Docs For Class arbitCliLogger

Core::arbitCliLogger

Class arbitCliLogger

Generic logger for all log messages Generic logger, which consumes all log messages, and annotates the with some basic context information.

Generic logger for all log messages Generic logger, which consumes all log messages, and annotates the with some basic context information.

Author(s):
Version:   $Revision: 1236 $
License:   GPL

Member Variables

protected ezcConsoleOutput $out
Output handler

Output handler

protected array $severities = array(
1 => 'Debug',
2 => 'Success',
4 => 'Failed',
8 => 'Info',
16 => 'Notice',
32 => 'Warning',
64 => 'Error',
128 => 'Fatal',
)

Severity mapping

Severity mapping

protected float $start
Request start time

Request start time

protected array $verbosity = array(
1 => 100,
2 => 100,
4 => 100,
8 => 50,
16 => 10,
32 => 10,
64 => 0,
128 => 0,
)

Mapping of severities to output verbosity

Mapping of severities to output verbosity

Method Summary

public static array getMessages( )
Receive debug messages
public void __construct( $output )
Create logger from output handler
public void writeLogMessage( $message , $severity , $source , $category , [ $extraInfo = array()] )
Writes the message $message to the log.

Methods

getMessages

static array getMessages( )

Receive debug messages

Receive debug messages Receive array with all aggregated debug messages

__construct

void __construct( $output )

Create logger from output handler

Create logger from output handler

Parameters:
Name Type Description
$output ezcConsoleOutput

writeLogMessage

void writeLogMessage( string $message , int $severity , string $source , string $category , [array(string=>string) $extraInfo = array()] )

Writes the message $message to the log.

Writes the message $message to the log. The writer can use the severity, source, and category to filter the incoming messages and determine the location where the messages should be written. The array $optional contains extra information that can be added to the log. For example: line numbers, file names, usernames, etc.

Parameters:
Name Type Description
$message string
$severity int ezcLog::DEBUG, ezcLog::SUCCESS_AUDIT, ezcLog::FAILED_AUDIT, ezcLog::INFO, ezcLog::NOTICE, ezcLog::WARNING, ezcLog::ERROR or ezcLog::FATAL.
$source string
$category string
$extraInfo array(string=>string)
Exceptions:
Type Description
ezcLogWriterException If the log writer was unable to write the log message
Documentation generated on Mon, 05 Apr 2010 14:02:02 +0200 by phpDocumentor 1.4.3