EventLog: ezcLogUnixFileWriter
[ ]
[ ]
[ ]
[ ]
[ ]
Class: ezcLogUnixFileWriter
|
Writes the log messages to a file in a format that is frequently used on the Unix operating system. [
source]
Parents
ezcLogFileWriter
|
--ezcLogUnixFileWriter
Inherited Member Variables
From
ezcLogFileWriter:
Method Summary
|
protected string |
implodeWithKey(
$splitEntry, $splitKeyVal, $data )
Returns a string from the hash $data. |
|
public void |
writeLogMessage(
$message, $eventType, $eventSource, $eventCategory, [$extraInfo = array()] )
Write the logEntries to a file. |
Inherited Methods
From
ezcLogFileWriter :
Methods
implodeWithKey
string implodeWithKey(
string
$splitEntry, string
$splitKeyVal, array(mixed=>mixed)
$data )
Returns a string from the hash $data.
The string $splitEntry specifies the string that will be inserted between the pairs. The string $splitKeyVal specifies the string that will be inserted in each pair.
Example:
1. $this->implodeWithKey( ", ", ": ", array( "Car" => "red", "Curtains" => "blue" );
Will create the following string:
Car: red, Curtains: blue
Parameters
| Name |
Type |
Description |
$splitEntry |
string |
|
$splitKeyVal |
string |
|
$data |
array(mixed=>mixed) |
|
writeLogMessage
void writeLogMessage(
string
$message, int
$eventType, string
$eventSource, string
$eventCategory, [array(string=>string)
$extraInfo = array()] )
Write the logEntries to a file.
Each line in the log file represents a log message. The log messages have the following style:
MMM dd HH:mm:ss [Severity] [Source] [Category] Message (ExtraInfo)
With:
- MMM: The 3 letter abbreviation of the month.
- dd: The day of the month.
- HH: The hour.
- mm: The minutes.
- ss: The seconds.
Example:
Jan 24 15:32:56 [Debug] [Paynet] [Shop] Connecting to the paynet server (file: paynet_server.php, line: 224).
Jan 24 15:33:01 [Debug] [Paynet] [Shop] Connected with the server (file: paynet_server.php, line: 710).
This method will be called by the
ezcLog class. The $eventSource and $eventCategory are either given in the
ezcLog::log() method or are the defaults from the
ezcLog class.
Parameters
| Name |
Type |
Description |
$message |
string |
|
$eventType |
int |
|
$eventSource |
string |
|
$eventCategory |
string |
|
$extraInfo |
array(string=>string) |
|
Last updated: Mon, 30 Mar 2009