IOLog() on 10.12

216 views
Skip to first unread message

Alexander Klyuev

unread,
Sep 9, 2016, 1:31:01 PM9/9/16
to darwin-...@lists.apple.com

Hi all,

 

I’m testing my kext on macOS 10.12 and cannot find any log messages the kext outputs using IOLog function although the kext gets loaded successfully. On previous versions of Mac OS X starting with 10.8 IOLog outputs log messages to /var/log/system.log but on 10.12 it doesn’t happen. Does anyone know any changes related to IOLog() function functionality on macOS 10.12?

 

Thanks,

Alexander

 

Garth Cummings

unread,
Sep 9, 2016, 2:01:00 PM9/9/16
to Alexander Klyuev, darwin-...@lists.apple.com
Hi Alexander,

There’s a new logging subsystem in macOS Sierra that was discussed at WWDC16. The session video goes into more details, but you should be able to find these messages using the greatly-improved Console app.

—gc

On Sep 9, 2016, at 10:30 AM, Alexander Klyuev <Alexande...@winmagic.com> wrote:

I’m testing my kext on macOS 10.12 and cannot find any log messages the kext outputs using IOLog function although the kext gets loaded successfully. On previous versions of Mac OS X starting with 10.8 IOLog outputs log messages to /var/log/system.log but on 10.12 it doesn’t happen. Does anyone know any changes related to IOLog() function functionality on macOS 10.12?
______________
Garth Cummings
Apple Developer Technical Support     gcum...@apple.com

http://developer.apple.com/support/resources/technical-support.html

Alexander Klyuev

unread,
Sep 9, 2016, 4:25:14 PM9/9/16
to gcum...@apple.com, darwin-...@lists.apple.com

Hi Garth,

 

Thank you for the response.

I hoped to find those messages using Console app as usual but they are not there for some reason. I never experienced such a problem since I started KEXT development on Mac OS X 10.4.

Should they really go to system.log by default on macOS 10.12 Sierra  without any changes in KEXT source code (meaning in using IOLog)? Any ideas regarding this?

 

Thank you,

Alexander

Garth Cummings

unread,
Sep 9, 2016, 7:14:59 PM9/9/16
to Alexander Klyuev, darwin-...@lists.apple.com
Hi Alex,

On Sep 9, 2016, at 1:15 PM, Alexander Klyuev <Alexande...@winmagic.com> wrote:

Hi Garth,
 
Thank you for the response.
I hoped to find those messages using Console app as usual but they are not there for some reason. I never experienced such a problem since I started KEXT development on Mac OS X 10.4.
Should they really go to system.log by default on macOS 10.12 Sierra  without any changes in KEXT source code (meaning in using IOLog)? Any ideas regarding this?
 
Thank you,
Alexander

All logging with legacy APIs is shimmed through the new logging system on Sierra.

In Console, search for messages from the process “kernel”. That’s working for me.

—gc

 
From: gcum...@apple.com [mailto:gcum...@apple.com] 
Sent: Friday, September 09, 2016 2:00 PM
To: Alexander Klyuev
Cc: darwin-...@lists.apple.com
Subject: Re: IOLog() on 10.12
 
Hi Alexander,
 
There’s a new logging subsystem in macOS Sierra that was discussed at WWDC16. The session video goes into more details, but you should be able to find these messages using the greatly-improved Console app.
 
—gc
 
On Sep 9, 2016, at 10:30 AM, Alexander Klyuev <Alexande...@winmagic.com> wrote:
 
I’m testing my kext on macOS 10.12 and cannot find any log messages the kext outputs using IOLog function although the kext gets loaded successfully. On previous versions of Mac OS X starting with 10.8 IOLog outputs log messages to /var/log/system.log but on 10.12 it doesn’t happen. Does anyone know any changes related to IOLog() function functionality on macOS 10.12?
______________
Garth Cummings
Apple Developer Technical Support     gcum...@apple.com

http://developer.apple.com/support/resources/technical-support.html

______________________________________________________________________
Garth Cummings
Sr. Software Engineer
Apple Developer Technical Support

"The last good thing written in C was
Franz Schubert's Symphony No. 9."
—Erwin Dieterich
1 Infinite Loop, MS 56-DTS
Cupertino, CA 95014






no...@dynax.at

unread,
Sep 10, 2016, 5:06:12 AM9/10/16
to darwin-...@lists.apple.com
Hi,

a new macOS release brings always a lot of changes which often lead to surprises for developers, especially kernel developers; disappearing kernel logs, or the completely rewritten USB interface in 10.11, and much more.

But there are often subtile changes, which require a lot of tedious kernel level debugging, simply because they are not documented. Well, the complete kernel interface is pretty bad documented - if at all. (I went thru all OSX incarnations from 10.1 on… imagine)

Is there a central place (beside the WWDC session videos) that summarises anything a kernel developer should be aware of for a new release? If not, wouldn't it be a good idea?

Cheers,
Hagen.
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Darwin-drivers mailing list (Darwin-...@lists.apple.com)
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/darwin-drivers/noise%40dynax.at
>
> This email sent to no...@dynax.at

Viele Grüsse/Cheers,
Hagen.
__________________
dynamic acoustics e.U.
Weyringergasse 37/3/11a
1040 Vienna / Austria
+43 680 1268 751

FN: 326751t

Alexander Klyuev

unread,
Sep 23, 2016, 11:10:56 AM9/23/16
to gcum...@apple.com, darwin-...@lists.apple.com

Hi Garth,

 

Thank you. Yes, I have found messages sent by my driver only in Console app’s <device> folder. However I noticed that driver messages go there not reliably. First of all looks like some messages don’t reach target stream at all. Secondly, search by key word in Console app’s <device> folder may not show messages sent in previous system sessions (before number of last restarts). So looks like they don’t survive restart some times.

 

I still keep this testing.

 

Thanks,

Alexander

Alexander Klyuev

unread,
Sep 23, 2016, 11:12:45 AM9/23/16
to vishal...@gmail.com, darwin-drivers, darwin-...@lists.apple.com

Hi there,

 

Thanks for additional info. I’ll give it a try.

- Alexander

 

From: vishal...@gmail.com [mailto:vishal...@gmail.com]
Sent: Friday, September 23, 2016 12:08 AM
To: darwin-drivers
Cc: gcum...@apple.com; darwin-...@lists.apple.com; Alexander Klyuev
Subject: Re: IOLog() on 10.12

 

I am now using vprintf instead of IOLogv for debug messages which seems to be working. Not sure what's happening to IOLogv log msgs though.



On Saturday, September 10, 2016 at 1:55:14 AM UTC+5:30, Alexander Klyuev wrote:

Reply all
Reply to author
Forward
0 new messages