diff options
author | Teddy Wing | 2023-09-30 02:41:34 +0200 |
---|---|---|
committer | Teddy Wing | 2023-09-30 02:41:34 +0200 |
commit | ccd903bf2136bf2e99262d995b3a98a0334ce221 (patch) | |
tree | 55029ded715ac9821fa6f0f4fb4f24594ebb538a | |
parent | f93058e072914e99bf677e360790c0866ad5ce5e (diff) | |
download | Base-Windowed-Application-ccd903bf2136bf2e99262d995b3a98a0334ce221.tar.bz2 |
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.
-rwxr-xr-x | bin/log | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -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}'" |