OSLogWriter not working properly#381
Conversation
This log writer requires a patch in kermit. See touchlab/Kermit#381 for details. Also, the OSLog system is bugged anyway, so it should not be used, until Apple releases a fix.
|
I've tried this PR locally and I am now able to obtain logs from the oslog on an end-user device with no xcode attached via The logs show up as The solution appears to be to change https://github.com/touchlab/Kermit/pull/381/files#diff-e77742a050dfd9cbf9a8cfc531a2f144dcb4c34f2b2064a2b3a3925e872d7fd3R20 to be Do you plan to rebase this PR @robbiehanson ? If not, I can take it over. |
Update: I've installed this PR along with the change mentioned in #400 to use Would love it if some attention was paid to this PR as well as the change suggested by the reporter of #400 . If it would help @kpgalligan I can submit an updated PR. |
As mentioned in issue #339, the OSLogWriter doesn't work properly. In particular, it doesn't properly send messages to the OSLog system, and as such, the messages get corrupted within the OSLogStore.
It seems the source of the problem is the use of an internal API:
_os_log_internal. Replacing this with a call to the public APIos_log_with_typefixes the problem.However, the standard
os_logfunctions (the public API's that Apple tells you to use) are mysteriously missing from the kotlin-generated headers. So to get around this problem I used a cInterop file.