job_id = $job_id; } public static function fromArray($row) { return new self( $row['level'], $row['category'], $row['ctime'], $row['pid'], $row['file'], $row['line'], $row['message'], $row['job_id'] ); } public function values() { return array( $this->level, $this->category, $this->ctime, static::$hostname, static::$progname, $this->pid, $this->file, $this->line, $this->message, $this->job_id, ); } public function jobId() { return $this->job_id; } protected static function log($logger, $severity, $job_id, $message, $category = SihnonFramework_Log::CATEGORY_DEFAULT) { $backtrace = debug_backtrace(false); $entry = new self($severity, $category, time(), getmypid(), $backtrace[1]['file'], $backtrace[1]['line'], $message, $job_id); $logger->log($entry); } public static function debug($logger, $job_id, $message, $category = SihnonFramework_Log::CATEGORY_DEFAULT) { static::log($logger, SihnonFramework_Log::LEVEL_DEBUG, $job_id, $message, $category); } public static function info($logger, $job_id, $message, $category = SihnonFramework_Log::CATEGORY_DEFAULT) { static::log($logger, SihnonFramework_Log::LEVEL_INFO, $job_id, $message, $category); } public static function warning($logger, $job_id, $message, $category = SihnonFramework_Log::CATEGORY_DEFAULT) { static::log($logger, SihnonFramework_Log::LEVEL_WARNING, $job_id, $message, $category); } public static function error($logger, $job_id, $message, $category = SihnonFramework_Log::CATEGORY_DEFAULT) { static::log($logger, SihnonFramework_Log::LEVEL_ERROR, $job_id, $message, $category); } } RippingCluster_LogEntry::initialise(); ?>