本文整理汇总了PHP中l::setSyslogPrefix方法的典型用法代码示例。如果您正苦于以下问题:PHP l::setSyslogPrefix方法的具体用法?PHP l::setSyslogPrefix怎么用?PHP l::setSyslogPrefix使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类l
的用法示例。
在下文中一共展示了l::setSyslogPrefix方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: die
// Game libraries
//
// proxycheck.php
//
// This is the main script for the proxy detector.
//
// Copyright(C) 2004-2008, DeepClone Development
//-----------------------------------------------------------------------
/* Checks for fork() */
if (!(function_exists('pcntl_fork') || $__runFromAdmin)) {
die("This script may not be called from the web server.\n");
}
/* Load the required libraries */
$__loader = array('log', 'classloader', 'version', 'game', 'tick', 'config', 'db_connection', 'db_accessor', 'db_copy', 'pcheck_thread', 'pcheck_manager', 'pcheck');
require_once "loader.inc";
l::setSyslogPrefix("lwProxy");
if (count($argv) > 1) {
/* Checks for command line arguments */
if (count($argv) > 2 && ($argv[1] == '-c' || $argv[1] == '-f')) {
$addresses = $argv;
array_shift($addresses);
array_shift($addresses);
print "Running manual check, please wait ...\n";
try {
$results = pcheck::check($addresses, $argv[1] == '-f');
} catch (Exception $e) {
print "{$argv[0]}: " . $e->getMessage() . "\n";
exit(1);
}
foreach ($results as $address => $proxy) {
print "\t{$address} - ";
示例2: Exception
$game = config::getGame($gName);
if (is_null($game)) {
throw new Exception("Game '{$gName}' not found");
}
l::notice("administration script executing tick {$gName}::{$tName}");
$game->getDBAccess();
$game->runTick($tName, true);
l::notice("tick {$gName}::{$tName} executed");
dbClose();
} catch (Exception $e) {
$argh = $e->getMessage();
}
chdir($oldDir);
return;
} else {
l::setSyslogPrefix("lwTicks");
if (count($argv) > 1) {
/* Checks for command line arguments */
if ($argv[1] == "-r" && count($argv) == 4) {
$game = $argv[2];
$tick = $argv[3];
dbConnect();
$game = config::getGame($argv[2]);
if (is_null($game)) {
die("Error: game {$argv[2]} not found");
}
l::notice("manually executing {$argv[2]}::{$argv[3]}");
$game->getDBAccess();
$game->runTick($argv[3], true);
l::notice("{$argv[2]}::{$argv[3]} executed");
dbClose();