-
Notifications
You must be signed in to change notification settings - Fork 0
Log Format
강찬욱 edited this page Aug 21, 2025
·
2 revisions
LogMate Agent는 다양한 로그 포맷을 수집하고 LogMate Streaming Server로 전송합니다. 현재 지원되는 로그 포맷은 다음과 같습니다.
Spring Boot 로그는 다음과 같은 구조로 파싱됩니다:
{
"isFormatCorrect": true,
"timestamp": "2025-08-20T15:12:30",
"level": "ERROR",
"thread": "main",
"logger": "com.example.MyService",
"message": "DB 연결 실패",
"userCode": "team-core"
}| 필드명 | 설명 |
|---|---|
| timestamp | 로그 발생 시각 (ISO-8601 형식) |
| level | 로그 레벨 (INFO, DEBUG, WARN, ERROR 등) |
| thread | 로그를 기록한 쓰레드 이름 |
| logger | 로그를 발생시킨 클래스 또는 패키지 이름 |
| message | 로그 메시지 내용 |
| userCode | 해당 로그를 식별할 수 있는 팀 또는 사용자 코드 (옵션) |
Tomcat 접근 로그는 Apache 공통 로그 포맷(Common Log Format)을 기반으로 파싱됩니다:
{
"isFormatCorrect": true,
"ip": "192.168.0.1",
"timestamp": "2025-08-20T10:16:01",
"method": "GET",
"url": "/api/v1/users",
"protocol": "HTTP/1.1",
"statusCode": 200,
"responseSize": 1234,
"referer": "https://example.com",
"userAgent": "Mozilla/5.0",
"extra": "-"
}| 필드명 | 설명 |
|---|---|
| ip | 클라이언트 IP 주소 |
| timestamp | 요청 발생 시각 (ISO-8601 형식) |
| method | HTTP 메서드 (GET, POST 등) |
| url | 요청한 URL 경로 |
| protocol | 사용된 HTTP 프로토콜 버전 |
| statusCode | 응답 상태 코드 (200, 404, 500 등) |
| responseSize | 응답 크기 (바이트 단위) |
| referer | 요청을 보낸 이전 페이지 (옵션) |
| userAgent | 사용자 브라우저 정보 (User-Agent 헤더 값) |
| extra | 기본 포맷 외에 파싱되지 않은 추가 정보를 저장 |
- 로그 포맷이 파싱되지 않을 경우,
isFormatCorrect = false로 마킹됩니다. - 향후 Nginx 등 다양한 포맷도 지원 예정입니다.