This log recorder can be used to logging generic kernel extension and IOKit driver in macOS
kextlogd will spawn a log(1)/syslog(1) process and redirect its output into a file
Build this project requres Xcode or Command Line Tools installed
# Use `release' target for release build
makeYou can specify additional variables in Makefile.inc
Theoretically this utility support macOS >= 10.4(macOS below 10.9 not yet tested)
Due to kext cache mechanism(need verbose explanation), log(1) itself may unstable for logging. i.e. sometimes there is no log even if you issued one from printf or IOLog.
In such case, a wordaround is to clean the kext cache and reload target kext
sudo kextcache -invalidate /
sudo kextunload -v foobar.kext
sudo kextload -v foobar.kext-
add install/uninstall targets into Makefile
-
add install agent/uninstall agent targets into Makefile