> For the complete documentation index, see [llms.txt](https://mikkicoding.mikkipastel.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mikkicoding.mikkipastel.com/android-developer-tips/android-logcat.md).

# Android Logcat

<figure><img src="/files/NpzHSHDmtLnS3Hn3ttNw" alt="" width="563"><figcaption></figcaption></figure>

Logcat บน Android Stuio ถูกเปลี่ยนหน้าตาไปในเวอร์ชั่น Dolphin | 2021.3.1 ซึ่งสามารถสร้างได้หลาย ๆ logcat windows ด้วยกันเนอะ

ส่วนประกอบของ logcat คร่าว ๆ ก็จะมี date แสดงวันที่และเวลา, tag ว่ามันมาจากไหน, package ก็คือมาจากแอพไหนแหละ, log level, message

แล้วตรงช่อง filter เราสามารถใส่อะไรได้บ้าง ไปดูกัน

* tag: ใส่ tag ที่เราต้องการ filter เช่น `tag:System.out`
* package: เลือก package name ที่เราต้องการ เช่นดูแค่แอพตัวเองก็ `package:mine`
* process: เลือก process name ที่เราต้องการ แต่ไม่ค่อยได้ใช้แหะ
* message: message จาก log ที่เราต้องการ เช่น `message:sendrequest`
* level: log level ที่เราอยากได้ โดยทั้งหมดจะมี Verbose (`V`, มี priority ตํ่าสุด), Debug (`D`), Info (`I`), Warning (`W`), Error (`E`), Fatal (`F`), Silent (`S` ,มี priority สูงสุด ซึ่งมันจะไม่พิมพ์อะไรออกมา) เช่นอยากดู error ก็ใส่ `level:error`
* age: เราอยากได้ logcat ล่าสุดเมื่อกี่วินาที (`s`) หรือกี่นาที (`m`) หรือกี่ชั่วโมง (`h`) หรือกี่วัน (`d`) เช่นอยากได้ log เมื่อ 5 นาทีที่ผ่านมา ก็ใส่ `age: 5m`


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://mikkicoding.mikkipastel.com/android-developer-tips/android-logcat.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
