stripos($l, $filter) !== false
));
}
// ── HTML 출력 ─────────────────────────────────────────────────────
$cleared = isset($_GET['cleared']);
?>
API Log Viewer
🔍 API Log Viewer
✅ 로그가 초기화됐습니다.
= $fileExist ? '로그 파일이 비어 있습니다.' : '아직 로그 파일이 없습니다.
API를 한 번 호출하면 자동 생성됩니다.' ?>
파일: = htmlspecialchars(LOG_FILE) ?> |
크기: = number_format($fileSize) ?> bytes |
표시: = count($logLines) ?>줄
= $filter !== '' ? ' (필터 적용: ' . htmlspecialchars($filter) . ')' : '' ?>
$line):
// 태그 추출 for 색상 ([2026-03-10 12:34:56] [태그] ...)
preg_match('/\[([^\]]+)\]\s*\[([^\]]+)\]/', $line, $m);
$tagClass = '';
if (!empty($m[2])) {
$t = strtolower($m[2]);
$tagClass = 'tag-' . preg_replace('/[^a-z0-9_]/', '_', $t);
}
?>
| = count($logLines) - $i ?> |
= htmlspecialchars($line) ?> |