| ํญ๋ชฉ | ๋ด์ฉ |
|---|---|
| Invoke | /inspector:log |
| Category | kobic-development |
| Complexity | simple |
| MCP Servers | flutter-inspector |
/inspector:log โ ์ฑ ๋ก๊ทธ ๋ค์ฌ๋ค๋ณด๊ธฐ#
ํ๋ง๋๋ก#
์คํ ์ค์ธ ์ฑ์ด ๋จ๊ธฐ๋ "๊ธฐ๋ก(๋ก๊ทธ)" ์ ๊บผ๋ด ๋ณด๊ณ , ๊ทธ์ค ๋ฌธ์ (์๋ฌ)๋ง ๊ณจ๋ผ๋ด๊ฑฐ๋ ํน์ ๋จ์ด๋ก ๊ฒ์ํ๋ ๋๊ตฌ์ ๋๋ค. ์ฑ์ด ๋งค ์๊ฐ ์ ์ด ๋๋ ์ผ๊ธฐ์ฅ์ ํผ์ณ, ์ด๋์ ๋ฌด์จ ์ผ์ด ์์๋์ง ๋์ง์ด ๋ณด๋ ๊ฒ๊ณผ ๊ฐ์์.
๋๊ฐยท์ธ์ ์ฐ๋์#
- ์ฑ์์ ์๋ฌ๊ฐ ๋ฌ๋๋ฐ ๋ฌด์์ด ์๋ชป๋๋์ง ์์ธ์ ํ์ธํ๊ณ ์ถ์ ๋
- ํน์ ๋์(์: ๋ก๊ทธ์ธ, ์ธ์ฆ)๊ณผ ๊ด๋ จ๋ ๋ฉ์์ง๋ฅผ ์ฐพ์๋ณด๊ณ ์ถ์ ๋
- ๊ฐ์ ์๋ฌ๊ฐ ๋ฐ๋ณตํด์ ๋๋ ํจํด์ ๋ถ์ํ๊ฑฐ๋, ์ฑ์ด ๊ฐ์๊ธฐ ๊บผ์ง๋(ํฌ๋์) ์์ธ์ ์ถ์ ํ ๋
๋ฌด์์ ํด์ฃผ๋์#
์คํ ์ค์ธ ์ฑ์ ๋ก๊ทธ๋ฅผ ๋ค์๊ณผ ๊ฐ์ด ๋ค๋ค ์ค๋๋ค.
- ์ต๊ทผ ๋ก๊ทธ ๋ณด๊ธฐ โ ๋ฐฉ๊ธ ์ผ์ด๋ ์ผ๋ค์ ์๊ฐ์์ผ๋ก ๊บผ๋ด ์ค๋๋ค.
- ์๋ฌ๋ง ๊ณจ๋ผ ๋ณด๊ธฐ โ ๋ฌธ์ ๊ฐ ๋ ๊ธฐ๋ก๋ง ์ถ๋ ค, ํ์ํ๋ฉด ์์ธํ ์ถ์ ์ ๋ณด(์คํ ํธ๋ ์ด์ค)๊น์ง ๋ณด์ฌ ์ค๋๋ค.
- ๊ฒ์ โ
auth๊ฐ์ ํค์๋๋ก ์ํ๋ ๊ธฐ๋ก๋ง ์ฐพ์ ์ค๋๋ค. - ํต๊ณ โ ๋ก๊ทธ๊ฐ ์ผ๋ง๋, ์ด๋ค ์ข ๋ฅ๋ก ์์๋์ง ์์ฝํด ์ค๋๋ค.
- ์ ๋ฆฌ(๋น์ฐ๊ธฐ) โ ์์ธ ๋ก๊ทธ๋ฅผ ๊นจ๋์ด ์ง์๋๋ค.
์ด๋ป๊ฒ ์ฐ๋์#
# ์ต๊ทผ ๋ก๊ทธ ํ์ธ
/inspector/log recent
# ์๋ฌ ๋ก๊ทธ๋ง ํ์ธ
/inspector/log errors
# ํน์ ํค์๋ ๊ฒ์ (์: auth)
/inspector/log search auth
# ๋ก๊ทธ ํต๊ณ ๋ณด๊ธฐ
/inspector/log stats
recent(์ต๊ทผ), errors(์๋ฌ๋ง), search(๊ฒ์), stats(ํต๊ณ) ๋ค์ ์ํ๋ ํญ๋ชฉ์ ๋ถ์ฌ ์ฐ๋ฉด ๋ฉ๋๋ค.
์์์ ๋ฌด์จ ์ผ์ด ๋ฒ์ด์ง๋์#
์์ฃผ ์ฐ๋ ์ง๋จ ํ๋ฆ์ ๋ค์๊ณผ ๊ฐ์ต๋๋ค.
- ๋ฐ๋ณต๋๋ ์๋ฌ ์ฐพ๊ธฐ โ ์๋ฌ ๋ก๊ทธ๋ฅผ ๋จผ์ ํ์ธํ๊ณ , ๊ฐ์ ์์น(ํ๊ทธ)์์ ๋ฐ๋ณต๋๋์ง ๋ณด๊ณ , ๊ทธ ๋งฅ๋ฝ์ ๋ถ์ํฉ๋๋ค.
-
์ฑ๋ฅ ๋ฌธ์ ์ถ์ โ
slow(๋๋ฆผ)๋timeout(์๊ฐ ์ด๊ณผ) ๊ฐ์ ๋จ์ด๋ก ๊ฒ์ํด, ํด๋น ์์ ์ฃผ๋ณ ๋ก๊ทธ๋ฅผ ์ดํด ๋ณ๋ชฉ ์ง์ ์ ์ฐพ์ต๋๋ค. - ์ฑ์ด ๊บผ์ง ์์ธ ์ฐพ๊ธฐ โ ๋ง์ง๋ง ์๋ฌ๋ฅผ ํ์ธํ๊ณ , ์ถ์ ์ ๋ณด๋ฅผ ๋ถ์ํ ๋ค, ์๋ฌ ์ง์ ์ ๊ธฐ๋ก๊น์ง ๊ฑฐ์ฌ๋ฌ ์ฌ๋ผ๊ฐ ์์ธ์ ์ง์ต๋๋ค.
โ๏ธ ์์ธ ์ต์ ยท์คํ ๋ช ์ธ (๊ฐ๋ฐ์ / AI ์์ด์ ํธ์ฉ)
Triggers#
- Error log check
- Debug message search
- Log pattern analysis
MCP Tools#
log_get_recent#
Returns recent logs.
Parameters:
limit: Maximum count (default 50)level: Log level filter (debug, info, warning, error)
Response example:
{
" logs " : [
{
" timestamp " : " 2024-01-01T10:00:00Z " ,
" level " : " info " ,
" tag " : " AuthBloc " ,
" message " : " User logged in successfully " ,
" data " : { " userId " : 123}
}
]
}log_get_errors#
Filters and returns only error logs.
Parameters:
limit: Maximum count (default 20)includeStackTrace: Whether to include stack trace
log_search#
Searches for specific patterns in logs.
Parameters:
query: Search string (required)tag: Tag filterlimit: Maximum count
log_get_stats#
Returns log statistics.
log_clear#
Clears logs.
Common Diagnostics#
Recurring errors#
1. log_get_errors - > Check error patterns
2. Confirm repeated occurrences from same tag
3. Analyze error contextPerformance issue tracking#
1. log_search query= " slow " or " timeout "
2. Analyze logs around relevant timeframes
3. Identify bottleneck pointsApp crash cause#
1. log_get_errors - > Check last error
2. Analyze stack trace
3. Trace logs immediately before the errorExamples#
Check recent logs#
/inspector/log recentCheck error logs only#
/inspector/log errorsSearch specific keywords#
/inspector/log search authLog statistics#
/inspector/log statsReferences#
- Detailed implementation:
.claude/agents/flutter-inspector-log.md - Master inspector:
.claude/commands/inspector.md