Re: Writing to system.log from within a filesystem kext
Re: Writing to system.log from within a filesystem kext
- Subject: Re: Writing to system.log from within a filesystem kext
- From: Brian Bergstrand <email@hidden>
- Date: Mon, 17 Oct 2005 17:41:48 -0500
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
The kernel log buffer has a limited fixed size, and if the system is
busy, or you are logging a lot of debug info, it will overflow and
the behavior you describe occurs. IOLog won't help either as it uses
the same log interface as the rest of the kernel. Pre-Tiger, I used
to call logwakeup() for debug logs, and it helped sometimes (but not
that much), but this has been removed from the Tiger KPI.
So, the bad news is there's not anything you can do other than write
your own logging mechanism. This should actually be fairly simple
using the kernel control sockets. You could send log packets from
your kext to a user land process that then logs to a file.
#include <sys/kern_control.h>
On Oct 17, 2005, at 5:01 PM, Ron Aldrich wrote:
Folks,
I'm having a bit of a problem writing debugging information to
system.log from with my filesystem kext.
I'm using printf to write to the system log, and it only works part
of the time.
Some of the printf statements work correctly, but others only
display the last character of the string which I'm attempting to
print.
In older versions of the OS (10.3 and prior) I was using IOLog (and
IOSleep) to make sure the string made it to system.log properly,
but it doesn't appear that I can use IOLog any more because of the
new rules for declaring KPI dependancies.
Has anyone else run into this kind of problem?
Thanks,
Ron Aldrich
Software Architects, Inc.
Brian Bergstrand
<http://www.bergstrand.org/brian/> PGP Key ID: 0xB6C7B6A2
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Darwin)
iD8DBQFDVCixedHYW7bHtqIRApzJAJ4tf7InGWp8PZdTO7YCRrqsQvw1sACeOuG4
ml2iXIdNEeE8fyGh72I8WYg=
=9uaT
-----END PGP SIGNATURE-----
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden