사용하지 않는 _Log, _Process 삭제
This commit is contained in:
@@ -1,44 +0,0 @@
|
||||
<?php
|
||||
require_once('_common.php');
|
||||
|
||||
class _Log {
|
||||
private static $flagLog = true;
|
||||
|
||||
public static function SetLog($type, $log) {
|
||||
$filename = ROOT.'/d_log/'.$type."Log.txt";
|
||||
if(_Log::$flagLog) AppendToFile($filename, $log."\n");
|
||||
}
|
||||
|
||||
public static function GetWorldLog($type, $size=10) {
|
||||
$filename = ROOT.'/d_log/'.$type."Log.txt";
|
||||
if(_Log::$flagLog) {
|
||||
$content = ReadToFileBackward($filename, $size*150);
|
||||
$logs = explode("\n", $content);
|
||||
$count = count($logs) - 1;
|
||||
$start = $count - $size;
|
||||
if($start < 0) $start = 0;
|
||||
for($i = $start; $i < $count; $i++) {
|
||||
$newLog[] = $logs[$i];
|
||||
}
|
||||
}
|
||||
return $newLog;
|
||||
}
|
||||
|
||||
public static function DecodeLog($log) {
|
||||
$log = str_replace("<R>", "<font color=red>", $log);
|
||||
$log = str_replace("<B>", "<font color=blue>", $log);
|
||||
$log = str_replace("<G>", "<font color=green>", $log);
|
||||
$log = str_replace("<M>", "<font color=magenta>", $log);
|
||||
$log = str_replace("<C>", "<font color=cyan>", $log);
|
||||
$log = str_replace("<L>", "<font color=limegreen>", $log);
|
||||
$log = str_replace("<S>", "<font color=skyblue>", $log);
|
||||
$log = str_replace("<O>", "<font color=orange>", $log);
|
||||
$log = str_replace("<D>", "<font color=darkorange>", $log);
|
||||
$log = str_replace("<Y>", "<font color=yellow>", $log);
|
||||
$log = str_replace("<W>", "<font color=white>", $log);
|
||||
$log = str_replace("</>", "</font>", $log);
|
||||
return $log;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,35 +0,0 @@
|
||||
<?php
|
||||
require_once('_common.php');
|
||||
require_once(ROOT.'/f_func/class._Lock.php');
|
||||
|
||||
class _Process {
|
||||
private static $mutexLog = false;
|
||||
|
||||
public static function ProcessingMutex($db) {
|
||||
// 어디선가 처리중이면 탈출
|
||||
if(_Lock::Busy() == true) return false;
|
||||
// 1명 외 접근 금지
|
||||
if(_Lock::Lock() != true) return false;
|
||||
|
||||
_Process::MutexLog('뮤텍스 진입');
|
||||
|
||||
// 처리
|
||||
_Process::Processing($db);
|
||||
|
||||
_Process::MutexLog('뮤텍스 탈출');
|
||||
|
||||
// 접근 금지 해제
|
||||
if(_Lock::UnLock() != true) return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private static function Processing($db) {
|
||||
}
|
||||
|
||||
private static function MutexLog($log) {
|
||||
if(_Process::$mutexLog) _Log::SetLog('mutex', $log);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user