site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:in-reply-to:references:mime-version:content-type:message-id:cc:content-transfer-encoding:from:subject:date:to:x-mailer; b=JceAKYRxJNcV93hhy9iz2GWQu9Aj+SvETIjiFvhNMAVcPoqOjSP4Mb0Vp6MpKrkVJt4pilwIDC5L/GTus1J7T4u0HxKXkHOan9TjSuqiBNPitC2HXj5Mr3RW2ubuhFGAkXa9whwgU24aYiw5aT+cT5+omkpbpuL3181f7hHGrq0=
the other is syslog() void logpri(int); void log(int, const char *, ...); My kext has the following dependencies. <key>com.apple.kpi.mach</key> <string>8.0.0</string> <key>com.apple.kpi.libkern</key> <string>8.0.0</string> <key>com.apple.kpi.bsd</key> <string>8.0.0</string> Now kextload fails, saying.. kextload: extension ./MyKext.kext appears to be valid kld(): Undefined symbols: _log _logpri thanks, Thulli. On 26-Oct-06, at 7:57 PM, Justin C. Walker wrote:
On Oct 26, 2006, at 24:42 , Thulli wrote: Not really a solution, for the same reasons the above aren't perfect. Justin -- Justin C. Walker, Curmudgeon at Large Institute for the Absorption of Federal Funds ----------- I'm beginning to like the cut of his jibberish. ----------- _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... really ? I assume you are refering to "Kernel.framework/Headers/sys/ syslog.h" After including the header <sys/syslog.h> i tried using the following calls in my kext. Changing the dependency to a more generic "com.apple.kernel" version 8.8.1 solves the kextload problem. Looks like log() and logpri() of syslog.h are unsupported ? b'coz i could trace the dependency of log() to "com.apple.kpi.unsupported" logpri() is there only in the header. Can somebody advise on the best method for logging from a kext. Considered the following. 1. printf and IOLog. I couldn't catch the logs just before my kext caused panic :) These are two choices; the other is syslog(). They all are pretty much the same (i.e., they are wrappers around the same code), although IOLog is designed for IOKit components. 2. Custom event logging: This method is very heavy. I don't want to write a user land tool, just for logging purpose. 3. asl looks very good. Is this available for a kext ? Well, the header file is in /usr/include, which is a great indicator for kernel use: can't (or shouldn't) be used in the kernel. Your basic problem is that, if a panic occurs, the system grinds to a halt and therefore, any scheme that makes use of system mechanisms will halt along with it. There is not a very good way to deal with this in the field, due to the above. Andrew's suggestion is about the best that I'm aware of. The ability to send a kernel dump to a (local) dump server might be of some help, depending on how your customers are set up. _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/thullishah% 40gmail.com This email sent to thullishah@gmail.com This email sent to site_archiver@lists.apple.com