I'm in the process of writing a DriverKit USBHostInterface driver, and while I'm finally starting to get there, I've run into a bit of a frustration with logging.
Naturally I have a liberal amount of os_log calls that I'm using to troubleshoot my driver. However I've noticed that they don't show up until after the first time my driver has loaded.
Meaning, for example, suppose I make a new build of my driver and it's bundled user-mode app, install the bundle to /Applications, run the installer, verify it took with systemextensionsctl list, fire up Console and start streaming log entries, then plug in my device.
I can see the log entries that show that my driver is loaded, etc., then a bunch of kernel -> <private> log entries, but none of my Start method log entries.
If I unplug my device and plug it in again, my log entries show up as expected.
Why is this and, more importantly, how can I fix it? I'd like to see those log entries the first time the driver loads, if I could.