@extends('layouts.app') @section('title', 'API 로그') @section('content')
{{ request('group_id') }} 필터 적용 중
필터 해제
| 시간 | 메서드 | URL | 상태 | 응답 | 테넌트 | 사용자 | 그룹 | |
|---|---|---|---|---|---|---|---|---|
| {{ $log->created_at->format('H:i:s') }} | {{ $log->method }} |
{{ $log->path }}
@php
$params = $log->request_body ?: $log->request_query ?: [];
if (is_array($params) && !empty($params)) {
$paramPairs = [];
foreach ($params as $key => $value) {
if (is_array($value)) {
$value = json_encode($value, JSON_UNESCAPED_UNICODE);
}
$paramPairs[] = $key . '=' . Str::limit((string)$value, 20);
}
$paramSummary = implode(', ', $paramPairs);
} else {
$paramSummary = '';
}
@endphp
@if(!empty($paramSummary))
{{ $paramSummary }}
@endif
|
{{ $log->response_status }} | {{ number_format($log->duration_ms) }}ms | @if($log->tenant) {{ Str::limit($log->tenant->company_name, 10) }} @else - @endif | @if($log->user) {{ $log->user->name ?? $log->user->email }} @else guest @endif | @if($log->group_id && ($groupCounts[$log->group_id] ?? 0) >= 2) {{ $groupCounts[$log->group_id] }} @else - @endif | |
요청 헤더
@foreach($log->request_headers ?? [] as $key => $values)
{{ $key }}:
{{ is_array($values) ? implode(', ', $values) : $values }}
@endforeach
응답 바디
@php
$responseData = json_decode($log->response_body, true);
if ($responseData !== null) {
$displayResponse = stripslashes(json_encode($responseData, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES));
} else {
$displayResponse = preg_replace_callback('/\\\\u([0-9a-fA-F]{4})/', function($m) {
return mb_convert_encoding(pack('H*', $m[1]), 'UTF-8', 'UTF-16BE');
}, $log->response_body ?? '');
$displayResponse = str_replace('\\/', '/', $displayResponse);
}
@endphp
{!! Str::limit($displayResponse, 2000) !!}
|
||||||||
| 로그가 없습니다. | ||||||||