Gegenbauer / CatSpy

Tool for browsing log.
Apache License 2.0
28 stars 4 forks source link
android coroutine customization filter kotlin log swing

CatSpy

English | 简体中文

Build status GitHub contributors GitHub all releases GitHub release (latest by SemVer) Latest release License

CatSpy - A tool designed for log browsing.

Key Features:

Advantages Compared to Other Android Log Viewing Tools

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

Interface

Home Page

home_page.png

File Log Page

file_log_main_interface.png

Device Log Page

device_log_main_interface.png

Log Customization Panel

log_customization_dialog.png

Theme Settings

theme_configuration.png

Download

Latest Release: Latest release

Launching the Application

Running After Installation from Packages

macOS

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:

  1. Open the dmg file and drag the application to the Applications folder.

  2. Find the application in the launchpad and open it.

  3. Dismiss the warning box that appears.

    macOS_open_warning.png

  4. Navigate to System Preferences -> Privacy & Security -> Security and click Open.

    macOS_grant_open_permission.png

  5. Attempt to open the application again.

Linux

After installing the .deb package, you can find the application icon in the application menu. Click on it to open the application.

Windows

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.

Running with JAR File

java -jar CatSpy-${version}.jar

Usage

Load File Log

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.

operation_open_file

Switch Log Parser for File Logs

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.

operation_choose_log_metadata

Read Device Logs

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.

warning_configure_adb_path

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.

operation_configure_adb_path

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.

operation_device_list

Filter Tags

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.

operation_save_filter

Log Filtering

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.

operation_filter

The size and position of filters can be adjusted in Menu -> Settings -> Log Customization -> Corresponding Parser -> Filter.

operation_configure_filter_ui

View Full Content of Selected Logs

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.

operation_open_log_detail_dialog

Add Bookmarks to Logs

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.

operation_log_bookmark

Log Search

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.

operation_search_log

Common Shortcuts

Log Search

Log Bookmarks

Build and Run

Environment

Support

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:

darklaf

jadx

JetBrains Logo (Main) logo