English | 简体中文
CatSpy - A tool designed for log browsing.
Key Features:
Advantage | CatSpy | Android Studio | Text Readers (Notepad++, sublime, fleet) |
---|---|---|---|
Memory Usage | Lighter than Android Studio, consuming less memory. However, due to JVM characteristics, it may still consume more memory compared to some pure text readers. | \ | \ |
Filtering Method | Supports individual filtering for message, tag, pid, tid, log level, etc. Text filters support both forward and reverse matching, with conditions combinable using OR logic. | Unique filtering syntax in Android Studio provides greater flexibility in filter creation. | Only supports text matching search |
Real-time Device Log Reading Support | Enables real-time device log reading and supports package name filtering. | Supported | \ |
The validity period of Real-time logs. | Captured real-time logs persist until manually cleared, allowing filtering at any time. | Real-time logs often disappear after device switching or due to other unknown reasons, often requiring log reproduction. | \ |
Real-time Log Export | Allows exporting real-time logs, with exported file size dependent on the device's memory. | Logs can be exported, but the exported files can only be viewed by importing into Android Studio, resulting in reduced readability. | \ |
File Log Import | Supports importing file logs, with size limitations based on the device's memory. | File logs can be imported, but only those exported from Android Studio in real-time are supported. | File logs can be imported |
On macOS, due to the application being unsigned, you may encounter an error indicating it cannot be opened. In such cases, follow these steps to open it:
Open the dmg file and drag the application to the Applications folder.
Find the application in the launchpad and open it.
Dismiss the warning box that appears.
Navigate to System Preferences -> Privacy & Security -> Security and click Open
.
Attempt to open the application again.
After installing the .deb package, you can find the application icon in the application menu. Click on it to open the application.
After installing the .msi package, you can find the application icon in the application menu. Click on it to open the application.
However, please note that it's advisable not to install the application in the C drive as it may encounter permission issues.
java -jar CatSpy-${version}.jar
On the homepage, click Open File
, select the log file, and it will open the file log page and load the selected log file.
You can also load files by directly dragging the file into the homepage or file log page.
On the file log page, you can switch parsers using the drop-down menu in the upper right corner. The default parser is DefaultRawLog
, which treats each line of the log as a whole, and filtering can only be done on the entire line.
If you are viewing a standard Android Logcat log, switch to StandardLogcatFileLog
, which divides the log into time
, message
, tag
, pid
, tid
, and log level
, allowing you to filter each part individually.
You can also go to Menu -> Settings -> Log Customization
to create your own log parser.
On the homepage, click Open Android Device Log Panel
to open the device log page. By default, it will search for the adb
path. If the adb
path is not found, a prompt will ask you to set it.
Click the Set
button, choose the adb
path, and click the Start ADB Server
button. After successfully starting the Adb service, click Save. The next time you open the device log page, if the Adb service is not running, it will start automatically.
After successfully starting the Adb service, the drop-down menu will display connected devices. Select a device and click the Start
button to read the device's logcat log.
When the filter group contains content, click the Save
button, enter the tag name, and click the Confirm
button to save the filter group.
Click the saved tag to apply it as the current filter group.
There are content filters, level filters, and case sensitivity filters.
Filters can be enabled or disabled; disabled filters will not take effect.
Content filters apply to corresponding columns and support regex matching. A single filter supports multiple conditions, which are in an OR relationship. Different filters are in an AND relationship. Both positive and negative matching are supported.
The size and position of filters can be adjusted in Menu -> Settings -> Log Customization -> Corresponding Parser -> Filter
.
The logs are displayed in a table format. If the content is too long, it may not fit in the table. You can double-click on the corresponding log line or
select some logs and press ENTER
to open the log detail dialog.
After opening the log detail dialog, you can press ESC
to close it.
Double-click on the corresponding log line or select some logs and press Ctrl + B
(or right-click the menu item) to add a bookmark to the selected logs.
After adding a bookmark, the background color of the log line will change.
You can check the Bookmark
filter above the log table to only display logs with bookmarks. In this case, the filter will be disabled.
For logs with bookmarks, you can press DELETE
(or right-click the menu item) to remove the bookmark.
Press Ctrl + F
to open the search panel, enter the search content, and click Previous
or Next
to locate the corresponding log.
Log search supports regex matching, condition stacking in OR form, and both positive and negative matching.
Ctrl + F
: Open the search panel, or focus the search editor if already openEsc
: If the search panel is open and focused, close the search panelEnter
: If the search panel is open and focused, search for the next matchShift + Enter
: If the search panel is open and focused, search for the previous matchCtrl + G
: Open the Go to Line
dialog and jump to the first log entry with a line number greater than or equal to the inputCtrl + B
: Add a bookmark to the selected logsDelete
: Remove the bookmark from the selected logsgit clone git@github.com:Gegenbauer/CatSpy.git
cd CatSpy
./gradlew :app:packageDeb # Build deb artifact
./gradlew :app:packageMsi # Build msi artifact
./gradlew :app:packageDmg # Build dmg artifact
./gradlew :app:run # Run
The project was initially based on lognote and underwent complete refactoring, with optimizations made to the log loading and rendering processes. It introduced the ability to build artifacts for various platforms, software update functionality, and paginated log display. The project structure is divided into multiple modules according to hierarchy, including cache, context, service, data binding, and logs modules.
Additionally, the project referenced the following: