private function handleLog($data) { if ($this->logger === null) { return; } $trace = !empty($data['trace']) ? ' Trace: [' . str_replace(PHP_EOL, ' | ', $data['trace']) . ']' : ""; $message = 'Message: ' . $data['message'] . ' File: ' . $data['file'] . ' Line:' . $data['line'] . $trace; $this->logger->addEntry($message, $data['type']); }
/** * Returns logger object. * * @param string $type * @return OW_Log */ public static function getInstance($type) { if (self::$classInstances === null) { self::$classInstances = array(); } if (empty(self::$classInstances[$type])) { self::$classInstances[$type] = new self($type); } return self::$classInstances[$type]; }
public static function getLogger($logType = 'ow') { return OW_Log::getInstance($logType); }