kext log output slides in log stream

Not sure it is a kernel issue, or a "log stream" issue, but when you start a day of developing, you get:


Requesting load of /tmp/zfs.kext.

/tmp/zfs.kext loaded successfully (or already loaded).


# log stream --source --predicate 'sender == "zfs"' --style compact


kernel.development[0:1b115] (zfs) ZFS: Loaded module v0.8.0-852_g6c5f6be15, ZFS pool version 5000, ZFS filesystem version 5


and as you hack away, kextunload'ing and kextloading the module, it gets offset (presumably due to location change of symbols?)


# kextunload -b net.lundman.zfs


compile, compile,


Requesting load of /tmp/zfs.kext.

/tmp/zfs.kext loaded successfully (or already loaded).


# log stream --source --predicate 'sender == "zfs"' --style compact


kernel.development[0:20c88] (zfs) ool version 5000, ZFS filesystem version 5


With enough time, you get just garbage. Rebooting fixes it.


Been the case since we got "log" command (Mavericks?)

See my issue at https://forums.developer.apple.com/thread/133313


It seems to me that log is not for development purpose (code, compile, repeat). It's for after the product is released to the user. If you want real logging, then maybe kprintf is needed or output information to an IO registry property...


There should be a method to invalidate whatever cache the log is using.

@Lundman, thanks for the report. Could you please file a bug, and attach a sysdiagnose taken when your machine is in the "garbage" state?

https://developer.apple.com/bug-reporting
https://developer.apple.com/bug-reporting/profiles-and-logs

Please post the bug number here for the record.

@joevt: log is absolutely intended to be used for development purposes, as well as end-user logging & diagnostics. When you see issues with log (either in the kernel or in userland), please do file a bug and attach a sysdiagnose.
kext log output slides in log stream
 
 
Q