From ccd903bf2136bf2e99262d995b3a98a0334ce221 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Sat, 30 Sep 2023 02:41:34 +0200 Subject: bin/log: Add script to stream logs from the application I wanted a way to get logs from the application when running the bundle rather than invoking the binary directly on the command line. This command provides something similar to what you would get in Xcode. --- bin/log | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 bin/log (limited to 'bin') diff --git a/bin/log b/bin/log new file mode 100755 index 0000000..7d37ca5 --- /dev/null +++ b/bin/log @@ -0,0 +1,12 @@ +#!/bin/sh + +# log +# Stream logs from the application. + +application_name="$( + /usr/libexec/PlistBuddy \ + -c 'Print :CFBundleName' \ + Info.plist +)" + +log stream --predicate "process == '${application_name}'" -- cgit v1.2.3