Trigger: Logcat Message
The Logcat Message trigger fires when specified content appears in the device's Logcat output. Logcat is a device-wide logging mechanism that records key system events, app messages, and errors. This trigger requires special permissions that must be granted via ADB on non-rooted devices.
Options
- Component: The component/tag name to filter log messages by. Use "*" to match all components. Supports wildcards and magic text.
- Text to Match: The text pattern to search for in log messages. Supports wildcards and magic text.
- Ignore Case: When enabled, the text matching is case-insensitive.
- Log Buffers: Configure which log buffers to monitor (in MacroDroid Settings):
- Main - Main application logs
- System - System messages
- Crash - Crash reports
- Kernel - Kernel messages (if available)
- Radio - Radio/telephony logs
- Events - System event logs
Requirements
This trigger requires the READ_LOGS permission, which must be granted via one of the following methods:
Method 1: ADB (Non-rooted devices)
1. Install the ADB tool on a computer
2. Enable USB Debugging on your device
3. Connect the device via USB
4. Run: adb shell pm grant com.arlosoft.macrodroid android.permission.READ_LOGS
Method 2: Root On rooted devices, MacroDroid will attempt to grant the permission automatically.
Android 14+ Additional Setup Additional configuration may be required on Android 14 and above. Consult the MacroDroid forum for specific instructions.
Examples
Example 1: Detect App Crash
Triggers Logcat Message - [*] FATAL EXCEPTION
Actions Popup Message - An app has crashed! Vibrate - 500ms
Detects when any app crashes and shows a notification.
Example 2: Monitor Specific App Messages
Triggers Logcat Message - [MyApp] Connection established
Actions Set Variable - app_connected = true
Monitors for a specific log message from a particular app.
Magic Text
When this trigger fires, the following magic text values are available:
- Full logcat line content - {logcat_line}
Notes
- The trigger clears the logcat buffer when it starts monitoring to prevent triggering on old messages.
- Log messages are processed in real-time as they appear.
- Wildcards (*) can be used in both component and text fields.
Performance Considerations
- Monitoring logcat can consume battery and processing resources.
- Use specific component filters when possible to reduce processing overhead.
- Consider the volume of log messages your filter might match.