public static function importChanges($instance) { try { $reflection = new ReflectionClass($instance); } catch (ReflectionException $e) { LegacyLogger::log("WARN", "Registry", "RUNKIT: Failed to reflect class, reason was: '" . $e->getMessage() . "'"); return; } LegacyLogger::log("DEBUG", "Registry", "Re-importing file '" . $reflection->getFileName() . "'"); runkit_import($reflection->getFileName(), RUNKIT_IMPORT_CLASSES | RUNKIT_IMPORT_FUNCTIONS | RUNKIT_IMPORT_OVERRIDE); }
protected function getServerAndPort($vars) { // Choose server if ($vars['use_proxy'] == 1) { // For use with the AO chat proxy ONLY! $server = $vars['proxy_server']; $port = $vars['proxy_port']; } else { if ($vars["dimension"] == 4) { $server = "chat.dt.funcom.com"; $port = 7109; } else { if ($vars["dimension"] == 5) { $server = "chat.d1.funcom.com"; $port = 7105; } else { LegacyLogger::log('ERROR', 'StartUp', "No valid server to connect with! Available dimensions are 4 and 5."); sleep(10); die; } } } return array($server, $port); }
public static function log($category, $tag, $message) { $logger = Logger::getLogger($tag); $level = LegacyLogger::getLoggerLevel($category); $logger->log($level, $message); }
public function isEnabledFor($category) { $level = LegacyLogger::getLoggerLevel($category); return $this->logger->isEnabledFor($level); }