Skip to content

Commit

Permalink
Add log_macOS.sh
Browse files Browse the repository at this point in the history
Display log messages from "com.apple.ifdreader" process

Use argument "-d" to change log level from "info" to "debug".
  • Loading branch information
LudovicRousseau committed Sep 8, 2021
1 parent aa47ed7 commit 3c403c4
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions log_macOS.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/bash

set -e

# default level
arg=--info

args=`getopt dbe $*` ; errcode=$?; set -- $args

if [ $errcode != 0 ]
then
echo "Usage: $0 [-d]"
echo "-d: debug level (default is info level)"
exit 2
fi

# check the script arguments
for i
do
case "$i"
in
-d)
arg=--debug
break;;
esac
done

log stream --predicate 'process = "com.apple.ifdreader"' $arg

0 comments on commit 3c403c4

Please sign in to comment.