applog

Log | Files | Refs | README

README.md (2279B)


      1 # applog
      2 
      3 A shell script that wraps `idevicesyslog` to show clean, colorized log output for a specific iOS app. Cuts through the noise of the full system log and surfaces only lines relevant to your app or bundle ID.
      4 
      5 ## Requirements
      6 
      7 ### macOS
      8 
      9 ```sh
     10 brew install usbmuxd libimobiledevice
     11 ```
     12 
     13 | Package | Role |
     14 |---------|------|
     15 | `usbmuxd` | USB multiplexer daemon — manages the connection between the host and iOS devices over USB |
     16 | `libimobiledevice` | Provides `idevicesyslog` and other iOS communication tools |
     17 
     18 > On macOS, Apple ships its own `usbmuxd` as part of the OS. If `idevicesyslog` works without the brew version, you can skip `usbmuxd`.
     19 
     20 ### Linux
     21 
     22 ```sh
     23 # Debian/Ubuntu
     24 sudo apt install usbmuxd libimobiledevice-utils
     25 
     26 # Arch
     27 sudo pacman -S usbmuxd libimobiledevice
     28 ```
     29 
     30 ### iOS device setup
     31 
     32 1. **Trust the host machine** — connect the device, tap *Trust* on the prompt, and enter your passcode.
     33 2. **Enable Developer Mode** (iOS 16+) — Settings → Privacy & Security → Developer Mode. The device will reboot.
     34 3. **Pair the device** (if prompted):
     35    ```sh
     36    idevicepair pair
     37    ```
     38 
     39 ### Other
     40 
     41 - bash 3.2+
     42 - USB cable (wireless/Wi-Fi connections are not supported by `idevicesyslog`)
     43 
     44 ## Usage
     45 
     46 ```sh
     47 ./applog.sh <bundle-id-prefix|process-name>
     48 ```
     49 
     50 **Examples:**
     51 
     52 ```sh
     53 ./applog.sh com.mycompany.myapp
     54 ./applog.sh MyApp
     55 ```
     56 
     57 Press `Ctrl+C` to stop.
     58 
     59 ## Output
     60 
     61 Each matched line is colorized by log level and separated by a visual rule:
     62 
     63 | Color  | Level |
     64 |--------|-------|
     65 | 🔴 Red    | `<Error>`, `<Fault>` |
     66 | 🟡 Yellow | `<Warning>` |
     67 | 🔵 Cyan   | `<Notice>` |
     68 | 🟢 Green  | `<Info>` |
     69 | Gray   | `<Debug>` |
     70 
     71 ## How filtering works
     72 
     73 Lines are included if they contain the filter string anywhere — the app's own process logs, plus system services acting on its behalf (network, Bluetooth, etc.).
     74 
     75 A blocklist of known noisy system daemons (`runningboardd`, `tccd`, `launchd`, and others) is excluded even when they reference your bundle ID, since those lines reflect system bookkeeping rather than app behavior.
     76 
     77 To suppress additional processes, add them to `BLOCKLIST_RE` near the top of the script.
     78 
     79 ## Installation
     80 
     81 ```sh
     82 chmod +x applog.sh
     83 # optionally move somewhere on your PATH
     84 cp applog.sh /usr/local/bin/applog
     85 ```