From 09596d92b2eea0f70c98cc5abca6f5dbd4629802 Mon Sep 17 00:00:00 2001 From: xue <> Date: Sun, 8 Jan 2006 18:13:02 +0000 Subject: Completed TLogger, TLogRouter, TFileLogRoute, TEmailLogRoute --- .../Log/EventLog/writers/writer_unix_file.php | 100 --------------------- 1 file changed, 100 deletions(-) delete mode 100644 framework/Log/EventLog/writers/writer_unix_file.php (limited to 'framework/Log/EventLog/writers/writer_unix_file.php') diff --git a/framework/Log/EventLog/writers/writer_unix_file.php b/framework/Log/EventLog/writers/writer_unix_file.php deleted file mode 100644 index a2045217..00000000 --- a/framework/Log/EventLog/writers/writer_unix_file.php +++ /dev/null @@ -1,100 +0,0 @@ - - * 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 {@link ezcLog} class. The $eventSource and $eventCategory are either given - * in the {@link ezcLog::log()} method or are the defaults from the {@link ezcLog} class. - * - * @param string $message - * @param int $eventType - * @param string $eventType - * @param string $eventCategory - * @param array(string=>string) $extraInfo - */ - public function writeLogMessage( $message, $eventType, $eventSource, $eventCategory, $extraInfo = array() ) - { - $extra = $this->implodeWithKey( ", ", ": ", $extraInfo ); - - if ( $eventCategory == false ) - { - $eventCategory = ""; - } - $logMsg = @date( "M d H:i:s" ) . - " [".ezcLog::translateSeverityName( $eventType ) . - "] [$eventSource] [$eventCategory] $message ($extra)\n"; - - $this->write( $eventType, $eventSource, $eventCategory, $logMsg ); - } - - /** - * 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: - * - * $this->implodeWithKey( ", ", ": ", array( "Car" => "red", "Curtains" => "blue" ); - * - * - * Will create the following string: - *
-     * Car: red, Curtains: blue
-     * 
- * - * @param string $splitEntry - * @param string $splitKeyVal - * @param array(mixed=>mixed) $data - * @return string - */ - protected function implodeWithKey( $splitEntry, $splitKeyVal, $data) - { - $total = ""; - if ( is_array( $data ) ) - { - foreach ( $data as $key => $val ) - { - $total .= $splitEntry . $key . $splitKeyVal . $val; - } - } - - return substr( $total, strlen( $splitEntry ) ); - } -} -?> -- cgit v1.2.3