pymobiledevice3 icon indicating copy to clipboard operation
pymobiledevice3 copied to clipboard

How to exit pymobiledevice3 syslog live from shell script

Open KittenYang opened this issue 1 year ago • 1 comments

I've run pymobiledevice3 syslog live to receive livetime iPhone log. I can exit use control+c shortcut, but how can I exit from shell script?

KittenYang avatar Aug 08 '22 12:08 KittenYang

Use your own python code to make such a snippet:

from pymobiledevice3.lockdown import LockdownClient
from pymobiledevice3.services.os_trace import OsTraceService

with OsTraceService(LockdownClient()) as os_trace:
    for line in os_trace.syslog():
        print(line)
        if some_condition_reached:
            break

doronz88 avatar Aug 08 '22 13:08 doronz88